Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Chart Scripting to change Gantt Chart Task Label
ctan1010
Hi,
I would like to use chart scripting to dynamically change the color of "Task Label" within Gantt Chart - Value (Y) Series.
I've been experimenting but could not find the appropriate function to call during onRender.
I've tried beforeDrawSeries() and beforeDrawSeriesTitle() but have not been able to locate "Task Label" within these functions.
Would appreciate your assistance.
Thank you.
Calvin
Find more posts tagged with
Comments
Virgil Dodson
Hi Calvin,<br />
<br />
On the series, it is the Decoration Label you are looking for. Below is a piece of code that will change those label colors, and attached is an example created in BIRT 2.5.1<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
function beforeDrawSeries( series, isr, icsc ) {
importPackage(Packages.org.eclipse.birt.chart.model.attribute.impl);
if (series.eClass().getName().equals("GanttSeries"))
{
java.lang.System.out.println(series);
series.getDecorationLabel().setBackground(ColorDefinitionImpl.BLACK());
}
}
</pre>
ctan1010
Hi vdodson,
Thank you for your examples.
However, I neglected to mention that I'm on Eclipse 3.4.1.
Unfortunately, getDecoration is not available on series on this version.
Any other thoughts ?