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)
scripted bar outline color and thickness in Gantt chart
jsOpa
Hi,<br />
<br />
I have just a short question. I'm using BIRT Report Designer 2.5.0.<br />
<br />
I fill the data point bars in a Gantt chart with the following code snip:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
function beforeDrawDataPoint( dph, fill, icsc )
{
var eventtyp=dph.getSeriesDisplayValue();
if (eventtyp==1){fill.set(128,255,128);}
if (eventtyp==2){fill.set(255,255,128);}
}
</pre>
<br />
How can I set the color and the thickness of the outline of the bars?<br />
<br />
Thanks in advance,<br />
<br />
Joerg
Find more posts tagged with
Comments
mwilliams
Something like this should do it:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
function beforeDrawSeries( series, seriesRenderer, context )
{
importPackage( Packages.org.eclipse.birt.chart.model.attribute );
importPackage( Packages.org.eclipse.birt.chart.model.attribute.impl );
if( series.getSeriesIdentifier() == "1" ){
var ol = series.getOutline();
ol.setThickness(3);
ol.setColor(ColorDefinitionImpl.BLUE());
}
}
</pre>