Sign in to follow this  
kselman

Turn off axis labels via JS

Recommended Posts

Im using the Line Chart.

 

 

 

Is there a way to turn on and off the labels on an axis?

 

 

 

I have a JavaScript onclick function associated with a text link near a small chart. When clicked it re-renders the selected chart in the larger DIV at the top of the page. in the JS I am setting a new width and height and calling render().

Edited by Guest

Share this post


Link to post
Share on other sites

Thanks for the reply. I tried your suggestion in my JavaScript and it didnt change anything. I know about the showLabels attribute in the xml file. I would like to turn it on and off client side via JavaScript.

 

 

 

Im starting a fusion chart from JavaScript:

 

< script type="text/javascript">

	var targetElement = document.getElementById("HiddenField");

	var overallChart = new FusionCharts("Area2D.swf", "ChartId", "650", "200", "0", "1");

	overallChart.setDataXML(targetElement.value);			   

               overallChart.showLabels='1'; <---------------- This does not turn on the Labels.		

               overallChart.render("overall_chart");

< /script>

Edited by Guest

Share this post


Link to post
Share on other sites

According to my experience, I've included explicit the attribute showLabels='1' into the chart's xml string:

 

 

 

//showLabels can to have two posibles values ( 0 | 1)

 

mychart.setDataXML("...");

 

 

 

Thanks,

 

Jorge Rivero

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this