Sign in to follow this  
salini

2D or 3D based on check box

Recommended Posts

Hi,

we want to use fusion chart in our application. we  are using the following code to create the chart.

 
var myChart = new FusionCharts("Column2D", "myChartId", "400", "300");
        //myChart.setJSONUrl("Data.json");
 
        var data = {
            "chart": { "caption": "Weekly Sales Summary", "xAxisName": "Week", "yAxisName": "Sales", "numberPrefix": "$" },
            "data": [{ "label": "Week 1", "value": "10400" }
                , { "label": "Week 2", "value": "18600" }
                , { "label": "Week 4", "value": "20700" }]
        }
 
        //alert(data.data[0].label);
        myChart.setJSONData(data);
        myChart.render("chartContainer");

 

Now our requirement is to set 2d/3d based on the state of checkbox on the page. Can you please suggest a way to this?

Share this post


Link to post
Share on other sites
Guest Rishab

Hi,

Using the FusionCharts JavaScript object, you can 'clone' an existing chart, pass it a parameter telling it to use a different chart type, and render it again.

Fusioncharts 'clone( [chartParams: Object] )' function allows you to duplicate a FusionCharts JavaScript object and uses its settings to create another chart.

For more information on its usage, please visit-
http://www.fusioncharts.com/demos/features/#dynamic-switching-of-chart-type

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