Home
Designing Analytics Reports
Chart Marker Line - setting style not working
Migrateduser
<p>Hello,</p>
<p> </p>
<p>I'm trying to change the line style for marker lines. With the following code, the lines' color and labels are</p>
<p>chaning but not the style.</p>
<p>Any idea where the error is?</p>
<p> </p>
<p>Thank you in advance,</p>
<p>Lucy</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>function beforeGeneration(chart, icsc)<br>
{<br>
importPackage(Packages.org.eclipse.birt.chart.model.component.impl);<br>
importPackage(Packages.org.eclipse.birt.chart.model.data.impl);<br>
importPackage(Packages.org.eclipse.birt.chart.model.attribute.impl);<br>
</p>
<p>/* calculation of variables lower_limit and upper_limit */<br>
<br>
<br>
var chart = icsc.getChartInstance();<br>
var yAxis = chart.getAxes().get(0).getAssociatedAxes().get(0);<br><br>
min_ml = MarkerLineImpl.create(yAxis, NumberDataElementImpl.create(lower_limit));<br>
min_ml.getLabel().getCaption().setValue("Lower Limit");<br>
min_ml.getLineAttributes().getColor().set(255,0,0);<br>
min_ml.getLineAttributes().setStyle(LineStyle.DASH_DOTTED_LITERAL);<br><br><br>
max_ml = MarkerLineImpl.create(yAxis, NumberDataElementImpl.create(upper_limit));<br>
max_ml.getLabel().getCaption().setValue("Upper Limit");<br>
max_ml.getLineAttributes().getColor().set(0,0,255);<br>
max_ml.getLineAttributes().setStyle(LineStyle.SOLID_LITERAL);</p>
<p> </p>
<p>}</p>
Find more posts tagged with
Comments
There are no comments yet