Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Show only the last DataPointLabel on a lines chart
iverona
<p>Hi!</p>
<p> </p>
<p>I'm trying to get a line chart with multiple series where only the last point (the rightmost one) is shown. So far I have had partial success with a script:</p>
<pre class="_prettyXprint _lang-js">
dpSize = 0
cnt = 0;
function afterDataSetFilled( series, dataSet, icsc )
{
dpSize = dataSet.getValues().length;
}
function beforeDrawDataPointLabel( dph, label, icsc )
{
if (cnt % 46 != 45) {
label.getCaption().setValue("");
}
cnt++;
}
</pre>
<p>(46 because my series have 46 points, I've to figure out how to get the length of the series).</p>
<p> </p>
<p>But, the problem is that some of my series have "0" as value, and looks like those are not counted as valid data points, so the math doesn't work. The below picture shows the data points and the value of "cnt" for each of them:</p>
<p> </p>
<p>
Find more posts tagged with
Comments
shamo
<p>Try this link <a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/39001-adding-label-to-line-chart/'>http://developer.actuate.com/community/forum/index.php?/topic/39001-adding-label-to-line-chart/</a></p>
;
iverona
<p>Thanks
@shamo
,</p>
<p> </p>
<p>Finally I realised the problem was the scale... it works with the linear one, but does not work with the log scale. It's a bug or a "feature"?</p>
<p> </p>
<p>
Clement Wong
<p>Attached is a design that has a label on the last data point for multiple series. It works for both linear and log scale. I tested in OS BIRT 3.7.2 and 4.6.0.</p>
<p> </p>
<p>