Sign in to follow this  

Fusion Chart height and width not working in ajax response

Recommended Posts

I using FusionChart with In implementation i hiting to server with ajax through which i get JSOn in response and i simply pass the json in datasource of fusion chart. Fusion chart is prepared successfully but in second time fusion chart in prepared but the output chart lost its own height and width. why is this so i can't understand. Following code i use

  <div id="dvGraph" style="width: 800px; height: 300px;">
<input type="button" value="click me" onclick="GetChartData()"/>
function GetChartData(){ var postURL = 'abc.aspx?data=PopUp';
        type: "POST",
        url: postURL,
        contentType: "application/json;charset=utf-8",
        dataType: "json",
        cache: false,
        beforeSend: function () {
        success: function (response) {
            var strJson = response.ChartParams[0];
        error: function (msg) {
function RenderChart(strJson) {

    var uniqueId = GetUniqueId(); // Like dv_5kF7e
    var myChart = new FusionCharts("MSCombiDY2D", uniqueId, "800", "320", "0", "1");


it work on first time with actual width:800 and hegiht: 320 but after that its not getting its actual height and width. Please refer Image1.jpg its good but after that height and width not working. But i regularly set height and width by calling RenderChart method.









Edited by shailendra311285

Share this post

Link to post
Share on other sites
Guest Sashibhusan



Ideally, there should not be any issue in your code, since the chart dimension is provided as pixel value.


Could you please try once by removing the inline style applied in the DIV having id "dvGraph" and see if it helps?


Also, please let me know, if the issue replicates in all browsers or in any specific browser?


Awaiting your response.

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