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)
Hide Flash Chart Legend
actuser9
Hi,<br />
<br />
I am using flash chart with the below code to change the series name based on the global persistant variable. I would like to hide the fourth series LEGEND name using the global persistant variable. <br />
<br />
Any suggestions?<br />
<br />
Thanks<br />
UY<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>function beforeRendering( flashChart, fcsc ){
chart = flashChart.getChart();
xAxis = chart.getBaseAxes()[0];
yAxis = chart.getOrthogonalAxes( xAxis, true)[0];
ySerieDef = yAxis.getSeriesDefinitions().get(0);
runSeries = ySerieDef.getRunTimeSeries();
var series = runSeries.get(0);
if (fcsc.getExternalContext().getScriptable().getPersistentGlobalVariable("y_SeriesTitle") == 'Test1' ){
series.setSeriesIdentifier("Difference"); }
else if( fcsc.getExternalContext().getScriptable().getPersistentGlobalVariable("y_SeriesTitle") == 'Test2' ){
series.setSeriesIdentifier("Relative"); }}
</pre>
Find more posts tagged with
Comments
kclark
Are you trying to make the title invisible or and item in the legend? If you're trying to make an item in the legend invisible you could use something similar to this code<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
function beforeDrawSeries( series, fcsc )
{
if (series.getSeriesIdentifier() == "103"){
series.setVisible(false);
}
</pre>
actuser9
Hi,
I was trying to hide the legend and the code worked like a charm.
Thanks
UY
kclark
No problem, glad you got it working!