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)
Stacked Bar Chart with Line Series
actuser9
Hi,
I have attached a sample report based on the flat file data source. As in the screen shot below, having multiple line series would generate the markers to the center of the stacked bar chart. When they have same values, the markers overlap. To avoid this, the markers would need to have a distance between them as shown below. Is this doable?
Any suggestions are welcome.
Thanks
UY
Find more posts tagged with
Comments
kclark
Can you attach the flat file so I can take a look at the report? Thanks!
actuser9
Hi,
I tried attaching the flat file but the forum does throw an error that .csv type of file could not be attached. Please suggest any alternative for uploading the same.
Thanks
UY
kclark
You can move the points if you add the following script to your chart.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
function beforeDrawSeries( series, seriesRenderer, context )
{
if( series.getSeriesIdentifier() == "Account" ){
var dpharray = seriesRenderer.getSeriesRenderingHints().getDataPoints();
for( j=0;j<dpharray.length;j++){
var xval = dpharray[j].getLocation().getX();
dpharray[j].getLocation().setX(xval-15);
}
}
if( series.getSeriesIdentifier() == "Index" ){
var dpharray = seriesRenderer.getSeriesRenderingHints().getDataPoints();
for( j=0;j<dpharray.length;j++){
var xval = dpharray[j].getLocation().getX();
dpharray[j].getLocation().setX(xval+15);
}
}
}
</pre>
actuser9
Hi,
Thank you. It worked out very well. Can you please indicate the best resources available for learning the chart events scripting?
Regards
UY
kclark
<a class='bbc_url' href='
http://help.eclipse.org/helios/nav/7_0_0'>Take
a look at this link</a> it should list all of the chart API's which is a good resource and there are a lot of great examples in the devshare.
actuser9
Great.
Thank you.
UY