-
Notifications
You must be signed in to change notification settings - Fork 0
Geoprism BIRT Javascript
rrowlands edited this page Oct 29, 2019
·
1 revision
Click on the chart. In the properties panel, select visibility. Check the Hide Element checkbox. Click the javascript syntax button next to the expression input. Use the following code:
params["category"].value == null || params["category"].value == '' || params["category"].value == '855'
function beforeGeneration( chart, icsc )
{
var title = icsc.getExternalContext().getScriptable().getParameterValue("categoryLabel");
chart.getTitle().getLabel().getCaption().setValue("Sales and Earnings over time for " + title);
}
function beforeGeneration( chart, icsc )
{
var reportContext = icsc.getExternalContext().getScriptable();
// Dynamically size the height of a chart based upon the number of values
var xAxis = chart.getBaseAxes()[0];
var yAxis = chart.getOrthogonalAxes( xAxis, true )[0];
var definition = yAxis.getSeriesDefinitions().get(0);
var allSeries = definition.getRunTimeSeries();
if(allSeries.size() > 0)
{
var series = allSeries[0];
//Retrieve list of data values
var list = series.getDataSet().getValues();
var length = list.length;
height = (length / 3 * 50) + 100;
if (reportContext.getOutputFormat() != "html"){
height = Math.min(height, 700);
}
chart.getBlock().getBounds().setHeight(height);
}
}
function beforeGeneration( chart, icsc )
{
var reportContext = icsc.getExternalContext().getScriptable();
var width = reportContext.getParameterValue("width");
if(width != null) {
chart.getBlock().getBounds().setWidth((width));
}
}
function beforeDrawDataPoint(dph, fill, icsc)
{
var label = icsc.getExternalContext().getScriptable().getParameterValue("categoryLabel");
var val = dph.getBaseDisplayValue();
if (val == label){
fill.set(255, 0, 0);
}
}
- Creating a New Installation
- Basic Server Maintenance
- Setting up a Development Environment
- Building the DDMS
- Notes about properties files
- Geoprism BIRT Javascript
- Offline Basemap Management
- DHIS2 Environment Setup
- HTTPS Setup with Lets Encrypt
- Google Tag Manager Setup
- ODK Environment Setup
- How Grids Work
- IRS And Query Builders
- Runway Metadata Update Process
- About Merg Form
- About Reloadable Infection