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
Chart and Colors
Migrateduser
<p>Hello BIRT community,</p><p> </p><p>is it possible to colors from the rows data. (BIRT 2.6.2)</p><p> </p><p>I have a row as a java object. The object has getters for the R;G;B colors.</p><p>I am trying to read the data from objects and use it in the chart.</p><pre class="_prettyXprint _linenums:1">importPackage( Packages.org.eclipse.birt.chart.model.data );importPackage( Packages.org.eclipse.birt.chart.model.data.impl );importPackage( Packages.org.eclipse.birt.chart.model.impl );importPackage( Packages.org.eclipse.birt.chart.model.type.impl );importPackage( Packages.org.eclipse.birt.chart.model.attribute );importPackage( Packages.org.eclipse.birt.chart.model.attribute.impl );importPackage( Packages.com.somepackage );function beforeGeneration( chart, icsc ) { sd = chart.getAxes().get(0).getAssociatedAxes().get(0).getSeriesDefinitions().get(0); sd.getSeriesPalette().getEntries().clear(); red = new Number(row["Object"].getColor().getR()); green = new Number(row["Object"].getColor()getG()); blue = new Number(row["Object"].getColor().getB()); sd.getSeriesPalette().getEntries().add(GradientImpl.create( ColorDefinitionImpl.create(red, green, blue), ColorDefinitionImpl.create(red, green, blue), -35, false ));}</pre><p>Is this kind of approach possible?</p><p> </p><p>For any sugesstions and hints thanks in advance,</p>
Find more posts tagged with
Comments
There are no comments yet