|
Re: Birt chart palette scripting issue [message #759508 is a reply to message #759074] |
Mon, 28 November 2011 20:31 |
|
Currently it does not have access to the other datapoints. You could
add a hidden table above the chart and load up a java array list using
the oncreate script that would allow you to access the other columns in
chart script. I used a similar example to get aggregated data for a pie
chart. Take a look at the attached example.
Jason
On 11/25/2011 6:21 PM, Arif wrote:
> Hello All,
>
> I want to change the scattergraph points color based on a column that is
> not being used on the x/y axis of the plot. How can i access that column
> from the data set in palette script. I have tried row["vehicle_count"]
> but it gives an error that row is not defined. I assumed that it will
> work like it works in expression builder. Can someone please tell me how
> do i access this data element(column)
>
>
> function beforeDrawDataPoint(dph, fill, icsc)
> {
> //Fill implements Fill interface //ImageImpl
> //ColorDefinitionImpl
> //GradientImpl
> //MultipleFillImpl
> //EmbeddedImageImpl
> //PatternImageImpl
>
> importPackage( Packages.org.eclipse.birt.chart.model.attribute.impl );
> val = dph.getOrthogonalValue();
> if( fill.getClass().isAssignableFrom(ColorDefinitionImpl)){
> if (row["vehicles_count"]>2){
> fill.set(255, 0, 0);
> }
> }
> }
>
>
>
>
> Br
> Arif
|
|
|
Powered by
FUDForum. Page generated in 0.03141 seconds