Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Highlights on Chart
Highlights on Chart [message #66262] Tue, 09 August 2005 21:51 Go to next message
Lillian is currently offline LillianFriend
Messages: 8
Registered: July 2009
Junior Member
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 08:51 Go to previous message
David Michonneau is currently offline David MichonneauFriend
Messages: 1145
Registered: July 2009
Senior Member
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
>
Previous Topic:Script engine error: TypeError: [JavaPackage org.eclipse.birt.util.VarianceFactory] is not a functio
Next Topic:How to Display Hidden row["field"]
Goto Forum:
  


Current Time: Sat Aug 10 07:35:19 GMT 2024

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

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

Back to the top