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)
Show Last series data value
shamo
<p>I would like to show only the last data label on a line chart . Any help will be welcomed. Thanks</p>
Find more posts tagged with
Comments
pricher
<p>Hi,</p>
<p> </p>
<p>Based on your recent posts, I assume this is for BIRT Commercial. (Please be a bit more specific in the future. Solutions for charting are quite different between BIRT O/S and BIRT Commercial)</p>
<p> </p>
<p>In an HTML5 chart, you can add the following script:</p>
<pre class="_prettyXprint _lang-js">
beforeDrawDataPoint: function(point, pointOptions, chart, seriesIndex, pointIndex)
{
var nbOfPoints = chart.getCore().series[0].data.length - 1; // Get the number of data points to display
//If the current data point is not the last one, display nothing
if (pointIndex != nbOfPoints) {
pointOptions.dataLabels = {
formatter: function() {
return '';
}
}
}
},
</pre>
<p>Sample report is attached.</p>
<p> </p>
<p>Hope this helps,</p>
<p> </p>
<p>P.</p>
shamo
<p>Thanks Pierre</p>