Highlights on Chart [message #66262] |
Tue, 09 August 2005 17:51  |
Eclipse User |
|
|
|
Hi, we can set conditions to highlight the content of a table or some
other report items, but is there a way to do the same thing on Chart, for
e.g., to highlight the Y-Series values depending on some condition?
Appreciate any help!
Thanks,
-Lillian
|
|
|
Re: Highlights on Chart [message #66331 is a reply to message #66262] |
Wed, 10 August 2005 04:51  |
Eclipse User |
|
|
|
Hi Lillian,
You can use chart scripting for that purpose. Here is an example that fills
a serie point with a specific color, for a data condition value>5 and
changes its label to "Highlited Value":
Please check the Chart_FAQ.doc included in the birt chart runtime download
for a full list of script functions and how to use them. The plugin
org.eclipse.birt.chart.examples should also include some samples with chart
scripting.
Thanks,
David
--
previousFill = new Object();// used for restoring the fill for the next
element
function beforeDrawElement(dataPointHints, fill)
{
previousFill.r = fill.getRed();
previousFill.g = fill.getGreen();
previousFill.b = fill.getBlue();
if ( dataPointHints.getOrthogonalValue() > 5 )
fill.set(255, 255, 0);
}
function afterDrawElement(dataPointHints, fill)
{
if ( dataPointHints.getOrthogonalValue() == null )
fill.set(previousFill.r, previousFill.g, previousFill.b);
}
function beforeDrawDataPoint(dataPointHints, label)
{
if ( dataPointHints.getOrthogonalValue() == null )
label.getCaption().setValue('Highlighted value');
}
--
"Lillian" <lillian.tan@gmail.com> wrote in message
news:583840c243bc87a1ec720ad99ffb6fd3$1@www.eclipse.org...
> Hi, we can set conditions to highlight the content of a table or some
> other report items, but is there a way to do the same thing on Chart, for
> e.g., to highlight the Y-Series values depending on some condition?
>
> Appreciate any help!
>
> Thanks,
> -Lillian
>
|
|
|
Powered by
FUDForum. Page generated in 0.05646 seconds