Luohui Report post Posted March 2, 2013 Why do not automatically resize?? window.onresize = function () { var _pos = Utility.getBodyPos(); var _page_Content_Panel_Width = _pos.clientWidth - 38; document.getElementById("li_01_content_day_daily_normal_chart").style.width = (_page_Content_Panel_Width * 1.000 / 2) + "px"; document.getElementById("li_01_content_day_grand_total_chart").style.width = (_page_Content_Panel_Width * 1.000 / 2) + "px"; document.getElementById("li_01_content_day_daily_normal_table").style.width = (_page_Content_Panel_Width * 1.000 / 2) + "px"; document.getElementById("li_01_content_day_grand_total_table").style.width = (_page_Content_Panel_Width * 1.000 / 2) + "px"; // //fillingChart(); var _chartReference_Day_Daily = FusionCharts("day_daily_chart_id"); var _chartReference_Grand_Total = FusionCharts("day_grand_chart_id"); if (_chartReference_Day_Daily) { //_chartReference_Day_Daily.resizeTo("100%", "100%"); // Why do not automatically resize?? _chartReference_Day_Daily.resizeTo((_page_Content_Panel_Width * 1.000 / 2), "100%");// Why do not automatically resize?? } // if (_chartReference_Grand_Total) { //_chartReference_Grand_Total.resizeTo("100%", "100%");// Why do not automatically resize?? _chartReference_Grand_Total.resizeTo((_page_Content_Panel_Width * 1.000 / 2), "100%");// Why do not automatically resize?? } } function fillingChart() { chartDayDailyXml = getChartXml("日日发生额", "DAY"); chartGrandTotalXml = getChartXml("日别累计(当月)", "MON"); var chart_Day_Daily = new FusionCharts("Utility/FusionCharts/Charts/MSCombiDY2D_Day_Daily.swf", "day_daily_chart_id", "100%", "100%", "0", "1"); chart_Day_Daily.setXMLData(chartDayDailyXml); chart_Day_Daily.render("li_01_content_day_daily_normal_chart"); var chart_Grand_Total = new FusionCharts("Utility/FusionCharts/Charts/MSCombiDY2D_Grand_Total.swf", "day_grand_chart_id", "100%", "100%", "0", "1"); chart_Grand_Total.setXMLData(chartGrandTotalXml); chart_Grand_Total.render("li_01_content_day_grand_total_chart"); } Share this post Link to post Share on other sites
FusionCharts Support Report post Posted March 6, 2013 Hi, You do not required to call resizeTo to resize a chart with set dimensions to 100%. All you need to do is to resize the container element. The chart will fit itself automatically. Share this post Link to post Share on other sites