Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Color BIRT Chart manipulation
Migrateduser
My graph is binded to one dataset and I am using the following script in the on render, after data set filled to fix the axis details :
=============================================================================
importPackage( Packages.java.util );
importPackage( Packages.org.eclipse.birt.chart.model.type.impl );
importPackage(Packages.org.eclipse.birt.chart.model.component.impl);
importPackage(Packages.org.eclipse.birt.chart.model.attribute);
function afterDataSetFilled(series, dataSet, icsc)
{
if( series.getClass() == BarSeriesImpl ){
var list = dataSet.getValues();
var X= parseInt(icsc.getExternalContext().getScriptable().getPersistentGlobalVariable("X"));
var Y= parseInt(icsc.getExternalContext().getScriptable().getPersistentGlobalVariable("Y"));
var Z= parseInt(icsc.getExternalContext().getScriptable().getPersistentGlobalVariable("Z"));
var narray1 = new ArrayList( );
narray1.add(X);
narray1.add(Y);
narray1.add(Z);
dataSet.setValues(narray1);
}else{
var catArray = new ArrayList();
catArray.add("Naming Convention ");
catArray.add("Basic Profile ");
catArray.add("Non-Stanbdard ");
dataSet.setValues(catArray);
}
} ==============================================================================
If I want to use the different colors to each bar in the graph how can I improve the script.
Thanks
AR
Find more posts tagged with
Comments
There are no comments yet