javascript - responsive pie chart with fusioncharts -
i want make fusionchart pie chart responsive, follow guide here : http://docs.fusioncharts.com/charts/contents/firstchart/changesize.html follow instructions in 'dynamic resize feature of charts' section.
but when page loaded, chart flatten out (no height).
when resize browser, chart size sucessfully responsive, small pie chart
why chart flatten when page first load? (i have resize browser first see chart). , why small chart?
here's code
<body style="height:100%;"> <div class="container-fluid"> <div class="row-fluid"> <div class="col-md-12"> <div id="chartcontainer" style="height:100%;"> fusioncharts xt load here! </div> </div> </div> </div> <script type="text/javascript"> fusioncharts.ready(function(){ var mychart = new fusioncharts({ "type": "pie2d", "dataformat": "jsonurl", "datasource": "pie.json", "width": "100%", "height": "100%" }); mychart.render("chartcontainer"); }); </script>
and here's pie.json :
{ "chart":{ "caption":"rasio pendapatan aeronautika & non-aeronautika", "subcaption":"januari-juni 2014", "palettecolors":"#008ee4,#6baa01,#f8bd19,#e44a00,#33bdda", "bgalpha":"0", "borderalpha":"20", "use3dlighting":"0", "showshadow":"0", "enablesmartlabels":"0", "startingangle":"0", "showpercentvalues":"1", "showpercentintooltip":"0", "decimals":"3"}, "data": [ { "label":"non-aeronautika", "value":"534.973.345.227\r", "link":"newchart-jsonurl-naero.json" }, { "label":"aeronautika", "value":"960.429.586.179\r", "link":"newchart-jsonurl-aero.json" } ]
}
could point mistake?
thanks attention, appreciated..
is issue in specific browser? works in chrome/firefox
please find dropbox link: https://dl.dropboxusercontent.com/u/44972996/pie.rar
Comments
Post a Comment