Skip to main content



      Home
Home » Archived » BIRT » how to control the chart palette?
how to control the chart palette? [message #116198] Wed, 25 January 2006 12:33 Go to next message
Eclipse UserFriend
Originally posted by: jchayes.hotmail.com

Hi,

I am creating a pie chart. The interesting thing is that the data contains
color codes for status such as red, green, amber. I would like the pie chart
colors to match my data colors.

It doesn't look like you can control slice colors using the data set
directly - which would be really nice feature.

So what is the recommended way to make this happen, fiddle the sql, add
some javascript hooks?

Any thoughts appreciated,
Cheers,
Conor.
Re: how to control the chart palette? [message #116211 is a reply to message #116198] Wed, 25 January 2006 12:44 Go to previous message
Eclipse UserFriend
Hi,

Indeed you cannot control the slice colors directly from the dataset, but I
think you should be able to achieve the effect you want by scripting.
Implement this script function
function beforeDrawDataPoint( dph, fill, context ){}

dph is the DataPointHints instance and can give you access to the data
value, then you can change the fill to use the color of the data. Look at
the org.eclipse.birt.chart.examples plugin for script examples.

Thanks,

David


"Conor Hayes" <jchayes@hotmail.com> wrote in message
news:dr8cm8$c7o$1@utils.eclipse.org...
> Hi,
>
> I am creating a pie chart. The interesting thing is that the data contains
> color codes for status such as red, green, amber. I would like the pie
> chart colors to match my data colors.
>
> It doesn't look like you can control slice colors using the data set
> directly - which would be really nice feature.
>
> So what is the recommended way to make this happen, fiddle the sql, add
> some javascript hooks?
>
> Any thoughts appreciated,
> Cheers,
> Conor.
>
>
>
Previous Topic:What Procedure to deploy report on tomcat ?
Next Topic:Confused about requirements for BIRT Install
Goto Forum:
  


Current Time: Thu Jul 17 14:22:34 EDT 2025

Powered by FUDForum. Page generated in 0.10349 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top