Sign in to follow this  

How To Change Or Set The Chart Properties From Html File

Recommended Posts






We have to change the chart properties from HTML using JavaScript's. I provide one sample here.





Please guide me to handle to change the chart properties















<title>Update Chart data</title>


<script type="text/javascript" src="charts/FusionCharts.js">








<div id="chartContainer">FusionCharts will load here!</div>


<script type="text/javascript"><!--





var myChart = new FusionCharts( "charts/Column3D.swf",


"myChartId", "800", "600", "0", "1" );









function showData(format)




var chartReference = FusionCharts( "myChartId" );


//alert( chartReference.getXMLData() );


//alert( "=="+chartReference.getChartData('xml') );


// alert( chartReference.getDataAsCSV())




// -->







<input type="button" onClick="showData('xml');" value="Show XML Data">

















<chart palette="3" useRoundEdges="1" animation="0" Flash_Movie="FC_COLUMN_2D.swf" showLabels="1" showValues="1" showSum="1" rotateValues="0" placeValuesInside="0" caption="Column Chart" subCaption="" xAxisName="" yAxisName="" decimals="0" FormatNumberScale="0" FormatNumber="1" legendPosition="BOTTOM" ThousandSeparator="," DecimalSeparator="." forceDecimals="1" showPercentValues="0" showPercentInToolTip="0">


<set label="Q1" value="3700" />


<set label="Q2" value="2900" />


<set label="Q3" value="3200" />


<set label="Q4" value="3900" />










for this Chart we have to change the chart animation from 1 to 0 and showLabels from 1 to 0 like that we have to change some chart properties from inside HTML using javascript



Share this post

Link to post
Share on other sites
Guest Chaitra



Welcome to FusionCharts Forum!


FusionCharts JavaScript class allows you to change various settings and properties of an existing chart.


You can use this feature to dynamically update the chart titles, theme colors, number formatting or scaling setup, divisional line and grid configurations and other functional and cosmetic features of an existing chart.


For example, you can change the "animation" attribute from 1 to 0.


Ref Code:


var chartReference = FusionCharts("myChartId");

chartReference.setChartAttribute({"animation" : "0"});


Please refer to the following link for more information.




Hope this helps!

Edited by Chaitra

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