Luohui Report post Posted March 4, 2013 HI~ 1.Why does not automatically resize?? 2.Why does not automatically redraw?? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[url="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/url]"> <html xmlns="[url="http://www.w3.org/1999/xhtml"]http://www.w3.org/1999/xhtml[/url]"> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <script src="Utility/FusionCharts/Charts/FusionCharts.js" type="text/javascript"></script> </head> <body> <div> <div style="height: 225px;"> <div id="daily_chart_panel" style=" height: 225px; float: left; background:#E2E8F0;"></div> <div id="grand_chart_panel" style=" height: 225px; float: right; background:#E2E8F0;"></div> </div> <input id="Button1" type="button" value="ReDraw" onclick="return reDraw_onclick()" /> </div> <script type="text/javascript"> window.daily_Chart = null; window.grand_Chart = null; window.dailyXml = null; window.grandXml = null; window.onerror = null; window.onresize = function () { // var _pos = window.getBodyPos(); // var _page_Content_Panel_Width = _pos.clientWidth - 38; // document.getElementById("daily_chart_panel").style.width = (_page_Content_Panel_Width * 1.000 / 2) + "px"; document.getElementById("grand_chart_panel").style.width = (_page_Content_Panel_Width * 1.000 / 2) + "px"; // window.daily_Chart = FusionCharts("daily_chart_id"); if (window.daily_Chart) { window.daily_Chart.resizeTo("100%", "100%"); //Why does not automatically resize?? } // window.grand_Chart = FusionCharts("grand_chart_id"); if (window.grand_Chart) { window.grand_Chart.resizeTo("100%", "100%"); //Why does not automatically resize?? } } window.onload = function () { window.getXml(); window.fillingChart(); window.onresize(); } function fillingChart() { //daily_Chart window.daily_Chart = FusionCharts("daily_chart_id"); if (!window.daily_Chart) { window.daily_Chart = new FusionCharts("Utility/FusionCharts/Charts/MSCombiDY2D_Day_Daily.swf", "daily_chart_id", "100%", "100%", "0", "1"); window.daily_Chart.setXMLData(window.dailyXml); window.daily_Chart.render("daily_chart_panel"); } else { window.daily_Chart = FusionCharts("daily_chart_id"); window.daily_Chart.setXMLData(window.dailyXml); //Why does not automatically redraw?? } //grand_Chart window.grand_Chart = FusionCharts("grand_chart_id"); if (!window.grand_Chart) { window.grand_Chart = new FusionCharts("Utility/FusionCharts/Charts/MSCombiDY2D_Grand_Total.swf", "grand_chart_id", "100%", "100%", "0", "1"); window.grand_Chart.setXMLData(window.grandXml); window.grand_Chart.render("grand_chart_panel"); } else { window.grand_Chart = FusionCharts("grand_chart_id"); window.grand_Chart.setXMLData(window.grandXml); //Why does not automatically redraw?? } } function getXml() { /* var xmlhttp = Utility.XmlHttpRequest.getXmlHttp(); xmlhttp.open("POST", "Item.aspx?r=" + Math.random() + "&I_REPDT=" + _I_REPDT + "&I_WAERS=" + _I_WAERS + "&I_PHQTY=" + _I_PHQTY, false); xmlhttp.send(null); xmldoc = xmlhttp.responseXML; window.dailyXml = window.getChartXml('Daily','Day'); window.grandXml = window.getChartXml('Grand','Mon'); */ window.dailyXml = "<chart caption=\"Daily\" showLegend=\"0\" legendPosition=\"RIGHT\" showValues=\"0\" sNumberSuffix=\"%\" decimals=\"1\" setAdaptiveYMin=\"1\" setAdaptiveSYMin=\"1\" lineThickness=\"1\" stack100percent=\"0\" canvasbgangle=\"0\" canvasborderthickness=\"2\" chartleftmargin=\"15\" chartrightmargin=\"5\" outcnvbasefontsize=\"11\" bgcolor=\"E2E8F0\" showcumulativeline=\"1\" linecolor=\"D3AF1D\" showplotborder=\"1\" plotgradientcolor=\"\" plotbordercolor=\"F5BA00\" showcanvasbg=\"1\" showcanvasbase=\"1\" canvasbgcolor=\"ffffff\" canvasbgalpha=\"90\" canvasbasecolor=\"D3DBCA\" showalternatehgridcolor=\"0\" showborder=\"0\" canvasborderalpha=\"20\" divlinealpha=\"15\" showshadow=\"1\" plotfillangle=\"100\" plotfillratio=\"\" plotborderdashed=\"0\" plotborderdashlen=\"1\" anchorradius=\"3\" anchorbgcolor=\"FFFFFF\" anchorborderthickness=\"3\" linethickness=\"2\" canvasBorderThickness=\"1\" canvasBorderColor=\"74787C\" showFCMenuItem=\"0\" chartTopMargin=\"10\" chartBottomMargin=\"10\" chartLeftMargin=\"10\" chartRightMargin=\"10\" captionPadding=\"10\" labelPadding=\"0\" adjustDiv= \"0\" numDivLines=\"3\" PYAxisMinValue=\"0\" PYAxisMaxValue=\"100\" SYAxisMinValue=\"0\" SYAxisMaxValue=\"40\"> <categories> <category label=\"2.22\"/> <category label=\"2.23\" /> <category label=\"2.24\" /> <category label=\"2.25\" /> <category label=\"2.26\" /> <category label=\"2.27\" /> <category label=\"2.28\" /> </categories> <dataset seriesname=\"A\" color=\"F5BA00\"> <set value=\"443\" hoverText=\"443\"/> <set value=\"394\" hoverText=\"394\"/> <set value=\"414\" hoverText=\"414\"/> <set value=\"610\" hoverText=\"610\"/> <set value=\"1002\" hoverText=\"1002\"/> <set value=\"83\" hoverText=\"83\"/> <set value=\"90\" hoverText=\"90\"/> </dataset> <dataset seriesname=\"B\" parentYAxis=\"S\" lineThickness=\"2\" color=\"5AC724\" anchorSides=\"3\" anchorRadius=\"7\" anchorBorderThickness=\"1\" anchorBorderColor=\"5AC724\" anchorBgColor=\"5AC724\"> <set value=\"15.5\" hoverText=\"15.5%\"/> <set value=\"15.5\" hoverText=\"15.5%\"/> <set value=\"15.5\" hoverText=\"15.5%\"/> <set value=\"15.5\" hoverText=\"15.5%\"/> <set value=\"15.5\" hoverText=\"15.5%\"/> <set value=\"14.1\" hoverText=\"14.1%\"/> <set value=\"14.1\" hoverText=\"14.1%\"/> </dataset> <dataset seriesname=\"C\" parentYAxis=\"S\" lineThickness=\"2\" color=\"733AE0\" anchorSides=\"8\" anchorRadius=\"5\" anchorBorderThickness=\"1\" anchorBorderColor=\"733AE0\" anchorBgColor=\"733AE0\"> <set value=\"15.9\" hoverText=\"15.9%\"/> <set value=\"14.2\" hoverText=\"14.2%\"/> <set value=\"14.9\" hoverText=\"14.9%\"/> <set value=\"21.9\" hoverText=\"21.9%\"/> <set value=\"36.0\" hoverText=\"36.0%\"/> <set value=\"0.0\" hoverText=\"0.0%\"/> <set value=\"0.0\" hoverText=\"0.0%\"/> </dataset> <styles> <definition> <style name=\"CanvasXScaleAnim\" type=\"ANIMATION\" duration=\"1\" start=\"0\" /> <style name=\"CanvasYScaleAnim\" type=\"ANIMATION\" duration=\"1\" start=\"0\"/> <style name=\"CaptionStyle\" type=\"font\" font=\"Verdana\" size=\"14\" color=\"464547\" bold=\"1\" bgColor=\"F1F4F8\" borderColor=\"D7DBDF\" leftMargin=\"5\" rightMargin=\"5\" letterSpacing=\"2\"/> </definition> <application> <apply toObject=\"Caption\" styles=\"CaptionStyle\" /> <apply toObject=\"Canvas\" styles=\"CanvasXScaleAnim,CanvasYScaleAnim\" /> </application> </styles></chart>"; window.grandXml = "<chart caption=\"Grand\" showLegend=\"0\" legendPosition=\"RIGHT\" showValues=\"0\" sNumberSuffix=\"%\" decimals=\"1\" setAdaptiveYMin=\"1\" setAdaptiveSYMin=\"1\" lineThickness=\"1\" stack100percent=\"0\" canvasbgangle=\"0\" canvasborderthickness=\"2\" chartleftmargin=\"15\" chartrightmargin=\"5\" outcnvbasefontsize=\"11\" bgcolor=\"E2E8F0\" showcumulativeline=\"1\" linecolor=\"D3AF1D\" showplotborder=\"1\" plotgradientcolor=\"\" plotbordercolor=\"F5BA00\" showcanvasbg=\"1\" showcanvasbase=\"1\" canvasbgcolor=\"ffffff\" canvasbgalpha=\"90\" canvasbasecolor=\"D3DBCA\" showalternatehgridcolor=\"0\" showborder=\"0\" canvasborderalpha=\"20\" divlinealpha=\"15\" showshadow=\"1\" plotfillangle=\"100\" plotfillratio=\"\" plotborderdashed=\"0\" plotborderdashlen=\"1\" anchorradius=\"3\" anchorbgcolor=\"FFFFFF\" anchorborderthickness=\"3\" linethickness=\"2\" canvasBorderThickness=\"1\" canvasBorderColor=\"74787C\" showFCMenuItem=\"0\" chartTopMargin=\"10\" chartBottomMargin=\"10\" chartLeftMargin=\"10\" chartRightMargin=\"10\" captionPadding=\"10\" labelPadding=\"0\" adjustDiv= \"0\" numDivLines=\"3\" PYAxisMinValue=\"0\" PYAxisMaxValue=\"100\" SYAxisMinValue=\"0\" SYAxisMaxValue=\"40\"> <categories> <category label=\"2.22\"/> <category label=\"2.23\" /> <category label=\"2.24\" /> <category label=\"2.25\" /> <category label=\"2.26\" /> <category label=\"2.27\" /> <category label=\"2.28\" /> </categories> <dataset seriesname=\"A\" color=\"F5BA00\"> <set value=\"9158\" hoverText=\"9158\"/> <set value=\"9549\" hoverText=\"9549\"/> <set value=\"9968\" hoverText=\"9968\"/> <set value=\"10580\" hoverText=\"10580\"/> <set value=\"11593\" hoverText=\"11593\"/> <set value=\"83\" hoverText=\"83\"/> <set value=\"173\" hoverText=\"173\"/> </dataset> <dataset seriesname=\"B\" parentYAxis=\"S\" lineThickness=\"2\" color=\"5AC724\" anchorSides=\"3\" anchorRadius=\"7\" anchorBorderThickness=\"1\" anchorBorderColor=\"5AC724\" anchorBgColor=\"5AC724\"> <set value=\"15.5\" hoverText=\"15.5%\"/> <set value=\"15.5\" hoverText=\"15.5%\"/> <set value=\"15.5\" hoverText=\"15.5%\"/> <set value=\"15.5\" hoverText=\"15.5%\"/> <set value=\"15.5\" hoverText=\"15.5%\"/> <set value=\"14.1\" hoverText=\"14.1%\"/> <set value=\"14.1\" hoverText=\"14.1%\"/> </dataset> <dataset seriesname=\"C\" parentYAxis=\"S\" lineThickness=\"2\" color=\"733AE0\" anchorSides=\"8\" anchorRadius=\"5\" anchorBorderThickness=\"1\" anchorBorderColor=\"733AE0\" anchorBgColor=\"733AE0\"> <set value=\"13.7\" hoverText=\"13.7%\"/> <set value=\"13.7\" hoverText=\"13.7%\"/> <set value=\"13.8\" hoverText=\"13.8%\"/> <set value=\"14.1\" hoverText=\"14.1%\"/> <set value=\"14.9\" hoverText=\"14.9%\"/> <set value=\"0.0\" hoverText=\"0.0%\"/> <set value=\"0.0\" hoverText=\"0.0%\"/> </dataset> <styles> <definition> <style name=\"CanvasXScaleAnim\" type=\"ANIMATION\" duration=\"1\" start=\"0\" /> <style name=\"CanvasYScaleAnim\" type=\"ANIMATION\" duration=\"1\" start=\"0\"/> <style name=\"CaptionStyle\" type=\"font\" font=\"Verdana\" size=\"14\" color=\"464547\" bold=\"1\" bgColor=\"F1F4F8\" borderColor=\"D7DBDF\" leftMargin=\"5\" rightMargin=\"5\" letterSpacing=\"2\"/> </definition> <application> <apply toObject=\"Caption\" styles=\"CaptionStyle\" /> <apply toObject=\"Canvas\" styles=\"CanvasXScaleAnim,CanvasYScaleAnim\" /> </application> </styles></chart>"; } function getChartXml(caption, zztyp) { var _dateList = getDateList(); var _xmlStr = ""; _xmlStr += "<chart caption=\"" + caption + "\" showLegend='0' legendPosition='RIGHT' showValues=\"0\" sNumberSuffix=\"%\" decimals=\"1\" setAdaptiveYMin=\"1\" setAdaptiveSYMin=\"1\" lineThickness=\"1\" stack100percent=\"0\" canvasbgangle=\"0\" canvasborderthickness=\"2\" chartleftmargin=\"15\" chartrightmargin=\"5\" outcnvbasefontsize=\"11\" bgcolor=\"E2E8F0\" showcumulativeline=\"1\" linecolor=\"D3AF1D\" showplotborder=\"1\" plotgradientcolor=\"\" plotbordercolor=\"F5BA00\" showcanvasbg=\"1\" showcanvasbase=\"1\" canvasbgcolor=\"ffffff\" canvasbgalpha=\"90\" canvasbasecolor=\"D3DBCA\" showalternatehgridcolor=\"0\" showborder=\"0\" canvasborderalpha=\"20\" divlinealpha=\"15\" showshadow=\"1\" plotfillangle=\"100\" plotfillratio=\"\" plotborderdashed=\"0\" plotborderdashlen=\"1\" anchorradius=\"3\" anchorbgcolor=\"FFFFFF\" anchorborderthickness=\"3\" linethickness=\"2\" canvasBorderThickness=\"1\" canvasBorderColor=\"74787C\" showFCMenuItem=\"0\" chartTopMargin=\"10\" chartBottomMargin=\"10\" chartLeftMargin=\"10\" chartRightMargin=\"10\" captionPadding=\"10\" labelPadding=\"0\" adjustDiv= \"0\" numDivLines=\"3\" PYAxisMinValue=\"0\" PYAxisMaxValue=\"100\" SYAxisMinValue=\"0\" SYAxisMaxValue=\"40\">"; _xmlStr += " <categories>"; _xmlStr += " <category label=\"" + _dateList[13] + "\"/>"; _xmlStr += " <category label=\"" + _dateList[12] + "\" />"; _xmlStr += " <category label=\"" + _dateList[11] + "\" />"; _xmlStr += " <category label=\"" + _dateList[10] + "\" />"; _xmlStr += " <category label=\"" + _dateList[9] + "\" />"; _xmlStr += " <category label=\"" + _dateList[8] + "\" />"; _xmlStr += " <category label=\"" + _dateList[7] + "\" />"; _xmlStr += " </categories>"; _xmlStr += " <dataset seriesname=\"A\" color=\"F5BA00\">"; if (xmldoc != null) { node = xmldoc.selectSingleNode("//rs:data/z:row[@ZZTYP='" + zztyp + "' and @CLSDT='" + window.CLSDT + "' and @CLS01='' and @CLS02='']"); if (node != null) { _xmlStr += " <set value=\"" + parseFloat(node.getAttribute("AMT01")).toFixed(0) + "\" hoverText=\"" + parseFloat(node.getAttribute("AMT01")).toFixed(0) + "\"/>"; _xmlStr += " <set value=\"" + parseFloat(node.getAttribute("AMT02")).toFixed(0) + "\" hoverText=\"" + parseFloat(node.getAttribute("AMT02")).toFixed(0) + "\"/>"; _xmlStr += " <set value=\"" + parseFloat(node.getAttribute("AMT03")).toFixed(0) + "\" hoverText=\"" + parseFloat(node.getAttribute("AMT03")).toFixed(0) + "\"/>"; _xmlStr += " <set value=\"" + parseFloat(node.getAttribute("AMT04")).toFixed(0) + "\" hoverText=\"" + parseFloat(node.getAttribute("AMT04")).toFixed(0) + "\"/>"; _xmlStr += " <set value=\"" + parseFloat(node.getAttribute("AMT05")).toFixed(0) + "\" hoverText=\"" + parseFloat(node.getAttribute("AMT05")).toFixed(0) + "\"/>"; _xmlStr += " <set value=\"" + parseFloat(node.getAttribute("AMT06")).toFixed(0) + "\" hoverText=\"" + parseFloat(node.getAttribute("AMT06")).toFixed(0) + "\"/>"; _xmlStr += " <set value=\"" + parseFloat(node.getAttribute("AMT07")).toFixed(0) + "\" hoverText=\"" + parseFloat(node.getAttribute("AMT07")).toFixed(0) + "\"/>"; } else { _xmlStr += " <set value=\"0\" hoverText=\"0\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0\"/>"; } } else { _xmlStr += " <set value=\"0\" hoverText=\"0\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0\"/>"; } _xmlStr += " </dataset>"; _xmlStr += " <dataset seriesname=\"B\" parentYAxis=\"S\" lineThickness=\"2\" color=\"5AC724\" anchorSides=\"3\" anchorRadius=\"7\" anchorBorderThickness=\"1\" anchorBorderColor=\"5AC724\" anchorBgColor=\"5AC724\">"; if (xmldoc != null) { node = xmldoc.selectSingleNode("//rs:data/z:row[@ZZTYP='" + zztyp + "' and @CLSDT='" + window.CLSDT + "' and @CLS01='PER' and @CLS02='']"); if (node != null) { _xmlStr += " <set value=\"" + (parseFloat(parseFloat(node.getAttribute("PER01")).toFixed(1)) > 40 ? 40 : parseFloat(node.getAttribute("PER01")).toFixed(1)) + "\" hoverText=\"" + parseFloat(node.getAttribute("PER01")).toFixed(1) + "%\"/>"; _xmlStr += " <set value=\"" + (parseFloat(parseFloat(node.getAttribute("PER02")).toFixed(1)) > 40 ? 40 : parseFloat(node.getAttribute("PER02")).toFixed(1)) + "\" hoverText=\"" + parseFloat(node.getAttribute("PER02")).toFixed(1) + "%\"/>"; _xmlStr += " <set value=\"" + (parseFloat(parseFloat(node.getAttribute("PER03")).toFixed(1)) > 40 ? 40 : parseFloat(node.getAttribute("PER03")).toFixed(1)) + "\" hoverText=\"" + parseFloat(node.getAttribute("PER03")).toFixed(1) + "%\"/>"; _xmlStr += " <set value=\"" + (parseFloat(parseFloat(node.getAttribute("PER04")).toFixed(1)) > 40 ? 40 : parseFloat(node.getAttribute("PER04")).toFixed(1)) + "\" hoverText=\"" + parseFloat(node.getAttribute("PER04")).toFixed(1) + "%\"/>"; _xmlStr += " <set value=\"" + (parseFloat(parseFloat(node.getAttribute("PER05")).toFixed(1)) > 40 ? 40 : parseFloat(node.getAttribute("PER05")).toFixed(1)) + "\" hoverText=\"" + parseFloat(node.getAttribute("PER05")).toFixed(1) + "%\"/>"; _xmlStr += " <set value=\"" + (parseFloat(parseFloat(node.getAttribute("PER06")).toFixed(1)) > 40 ? 40 : parseFloat(node.getAttribute("PER06")).toFixed(1)) + "\" hoverText=\"" + parseFloat(node.getAttribute("PER06")).toFixed(1) + "%\"/>"; _xmlStr += " <set value=\"" + (parseFloat(parseFloat(node.getAttribute("PER07")).toFixed(1)) > 40 ? 40 : parseFloat(node.getAttribute("PER07")).toFixed(1)) + "\" hoverText=\"" + parseFloat(node.getAttribute("PER07")).toFixed(1) + "%\"/>"; } else { _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; } } else { _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; } _xmlStr += " </dataset>"; _xmlStr += " <dataset seriesname=\"C\" parentYAxis=\"S\" lineThickness=\"2\" color=\"733AE0\" anchorSides=\"8\" anchorRadius=\"5\" anchorBorderThickness=\"1\" anchorBorderColor=\"733AE0\" anchorBgColor=\"733AE0\">"; if (xmldoc != null) { node = xmldoc.selectSingleNode("//rs:data/z:row[@ZZTYP='" + zztyp + "' and @CLSDT='" + window.CLSDT + "' and @CLS01='' and @CLS02='']"); if (node != null) { _xmlStr += " <set value=\"" + (parseFloat(parseFloat(node.getAttribute("PER01")).toFixed(1)) > 40 ? 40 : parseFloat(node.getAttribute("PER01")).toFixed(1)) + "\" hoverText=\"" + parseFloat(node.getAttribute("PER01")).toFixed(1) + "%\"/>"; _xmlStr += " <set value=\"" + (parseFloat(parseFloat(node.getAttribute("PER02")).toFixed(1)) > 40 ? 40 : parseFloat(node.getAttribute("PER02")).toFixed(1)) + "\" hoverText=\"" + parseFloat(node.getAttribute("PER02")).toFixed(1) + "%\"/>"; _xmlStr += " <set value=\"" + (parseFloat(parseFloat(node.getAttribute("PER03")).toFixed(1)) > 40 ? 40 : parseFloat(node.getAttribute("PER03")).toFixed(1)) + "\" hoverText=\"" + parseFloat(node.getAttribute("PER03")).toFixed(1) + "%\"/>"; _xmlStr += " <set value=\"" + (parseFloat(parseFloat(node.getAttribute("PER04")).toFixed(1)) > 40 ? 40 : parseFloat(node.getAttribute("PER04")).toFixed(1)) + "\" hoverText=\"" + parseFloat(node.getAttribute("PER04")).toFixed(1) + "%\"/>"; _xmlStr += " <set value=\"" + (parseFloat(parseFloat(node.getAttribute("PER05")).toFixed(1)) > 40 ? 40 : parseFloat(node.getAttribute("PER05")).toFixed(1)) + "\" hoverText=\"" + parseFloat(node.getAttribute("PER05")).toFixed(1) + "%\"/>"; _xmlStr += " <set value=\"" + (parseFloat(parseFloat(node.getAttribute("PER06")).toFixed(1)) > 40 ? 40 : parseFloat(node.getAttribute("PER06")).toFixed(1)) + "\" hoverText=\"" + parseFloat(node.getAttribute("PER06")).toFixed(1) + "%\"/>"; _xmlStr += " <set value=\"" + (parseFloat(parseFloat(node.getAttribute("PER07")).toFixed(1)) > 40 ? 40 : parseFloat(node.getAttribute("PER07")).toFixed(1)) + "\" hoverText=\"" + parseFloat(node.getAttribute("PER07")).toFixed(1) + "%\"/>"; } else { _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; } } else { _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; _xmlStr += " <set value=\"0\" hoverText=\"0.0%\"/>"; } _xmlStr += " </dataset>"; _xmlStr += " <styles>"; _xmlStr += " <definition>"; _xmlStr += " <style name=\"CanvasXScaleAnim\" type=\"ANIMATION\" duration=\"1\" start=\"0\" />"; _xmlStr += " <style name=\"CanvasYScaleAnim\" type=\"ANIMATION\" duration=\"1\" start=\"0\"/>"; _xmlStr += " <style name=\"CaptionStyle\" type=\"font\" font=\"Verdana\" size=\"14\" color=\"464547\" bold=\"1\" bgColor=\"F1F4F8\" borderColor=\"D7DBDF\" leftMargin=\"5\" rightMargin=\"5\" letterSpacing=\"2\"/>"; _xmlStr += " </definition>"; _xmlStr += " <application>"; _xmlStr += " <apply toObject=\"Caption\" styles=\"CaptionStyle\" />"; _xmlStr += " <apply toObject=\"Canvas\" styles=\"CanvasXScaleAnim,CanvasYScaleAnim\" />"; _xmlStr += " </application>"; _xmlStr += " </styles>"; _xmlStr += "</chart>"; return _xmlStr; } function getBodyPos() { if (document.compatMode == "BackCompat") { return { // clientWidth: document.body.clientWidth, clientHeight: document.body.clientHeight, // scrollWidth: document.body.scrollWidth, scrollHeight: document.body.scrollHeight, // clientLeft: document.body.clientLeft, clientTop: document.body.clientTop, // scrollLeft: document.body.scrollLeft, scrollTop: document.body.scrollTop, // Width: Math.max(document.body.clientWidth, document.body.scrollWidth), Height: Math.max(document.body.clientHeight, document.body.scrollHeight) }; } else { return { // clientWidth: document.documentElement.clientWidth, clientHeight: document.documentElement.clientHeight, // scrollWidth: document.documentElement.scrollWidth, scrollHeight: document.documentElement.scrollHeight, // clientLeft: document.documentElement.clientLeft, clientTop: document.documentElement.clientTop, // scrollLeft: document.documentElement.scrollLeft, scrollTop: document.documentElement.scrollTop, // width: Math.max(document.documentElement.clientWidth, document.documentElement.scrollWidth), height: Math.max(document.documentElement.clientHeight, document.documentElement.scrollHeight) }; } } function reDraw_onclick() { //window.getXml(); window.dailyXml = "<chart caption=\"Daily_New\" showLegend=\"0\" legendPosition=\"RIGHT\" showValues=\"0\" sNumberSuffix=\"%\" decimals=\"1\" setAdaptiveYMin=\"1\" setAdaptiveSYMin=\"1\" lineThickness=\"1\" stack100percent=\"0\" canvasbgangle=\"0\" canvasborderthickness=\"2\" chartleftmargin=\"15\" chartrightmargin=\"5\" outcnvbasefontsize=\"11\" bgcolor=\"E2E8F0\" showcumulativeline=\"1\" linecolor=\"D3AF1D\" showplotborder=\"1\" plotgradientcolor=\"\" plotbordercolor=\"F5BA00\" showcanvasbg=\"1\" showcanvasbase=\"1\" canvasbgcolor=\"ffffff\" canvasbgalpha=\"90\" canvasbasecolor=\"D3DBCA\" showalternatehgridcolor=\"0\" showborder=\"0\" canvasborderalpha=\"20\" divlinealpha=\"15\" showshadow=\"1\" plotfillangle=\"100\" plotfillratio=\"\" plotborderdashed=\"0\" plotborderdashlen=\"1\" anchorradius=\"3\" anchorbgcolor=\"FFFFFF\" anchorborderthickness=\"3\" linethickness=\"2\" canvasBorderThickness=\"1\" canvasBorderColor=\"74787C\" showFCMenuItem=\"0\" chartTopMargin=\"10\" chartBottomMargin=\"10\" chartLeftMargin=\"10\" chartRightMargin=\"10\" captionPadding=\"10\" labelPadding=\"0\" adjustDiv= \"0\" numDivLines=\"3\" PYAxisMinValue=\"0\" PYAxisMaxValue=\"100\" SYAxisMinValue=\"0\" SYAxisMaxValue=\"40\"> <categories> <category label=\"2.22\"/> <category label=\"2.23\" /> <category label=\"2.24\" /> <category label=\"2.25\" /> <category label=\"2.26\" /> <category label=\"2.27\" /> <category label=\"2.28\" /> </categories> <dataset seriesname=\"A\" color=\"F5BA00\"> <set value=\"543\" hoverText=\"543\"/> <set value=\"394\" hoverText=\"394\"/> <set value=\"414\" hoverText=\"414\"/> <set value=\"710\" hoverText=\"710\"/> <set value=\"1002\" hoverText=\"1002\"/> <set value=\"83\" hoverText=\"83\"/> <set value=\"90\" hoverText=\"90\"/> </dataset> <dataset seriesname=\"B\" parentYAxis=\"S\" lineThickness=\"2\" color=\"5AC724\" anchorSides=\"3\" anchorRadius=\"7\" anchorBorderThickness=\"1\" anchorBorderColor=\"5AC724\" anchorBgColor=\"5AC724\"> <set value=\"20.5\" hoverText=\"20.5%\"/> <set value=\"20.5\" hoverText=\"20.5%\"/> <set value=\"20.5\" hoverText=\"20.5%\"/> <set value=\"20.5\" hoverText=\"20.5%\"/> <set value=\"20.5\" hoverText=\"20.5%\"/> <set value=\"20.5\" hoverText=\"20.5%\"/> <set value=\"20.5\" hoverText=\"20.5%\"/> </dataset> <dataset seriesname=\"C\" parentYAxis=\"S\" lineThickness=\"2\" color=\"733AE0\" anchorSides=\"8\" anchorRadius=\"5\" anchorBorderThickness=\"1\" anchorBorderColor=\"733AE0\" anchorBgColor=\"733AE0\"> <set value=\"15.9\" hoverText=\"15.9%\"/> <set value=\"14.2\" hoverText=\"14.2%\"/> <set value=\"14.9\" hoverText=\"14.9%\"/> <set value=\"21.9\" hoverText=\"21.9%\"/> <set value=\"26.0\" hoverText=\"26.0%\"/> <set value=\"10.0\" hoverText=\"10.0%\"/> <set value=\"0.0\" hoverText=\"0.0%\"/> </dataset> <styles> <definition> <style name=\"CanvasXScaleAnim\" type=\"ANIMATION\" duration=\"1\" start=\"0\" /> <style name=\"CanvasYScaleAnim\" type=\"ANIMATION\" duration=\"1\" start=\"0\"/> <style name=\"CaptionStyle\" type=\"font\" font=\"Verdana\" size=\"14\" color=\"464547\" bold=\"1\" bgColor=\"F1F4F8\" borderColor=\"D7DBDF\" leftMargin=\"5\" rightMargin=\"5\" letterSpacing=\"2\"/> </definition> <application> <apply toObject=\"Caption\" styles=\"CaptionStyle\" /> <apply toObject=\"Canvas\" styles=\"CanvasXScaleAnim,CanvasYScaleAnim\" /> </application> </styles></chart>"; window.grandXml = "<chart caption=\"Grand_New\" showLegend=\"0\" legendPosition=\"RIGHT\" showValues=\"0\" sNumberSuffix=\"%\" decimals=\"1\" setAdaptiveYMin=\"1\" setAdaptiveSYMin=\"1\" lineThickness=\"1\" stack100percent=\"0\" canvasbgangle=\"0\" canvasborderthickness=\"2\" chartleftmargin=\"15\" chartrightmargin=\"5\" outcnvbasefontsize=\"11\" bgcolor=\"E2E8F0\" showcumulativeline=\"1\" linecolor=\"D3AF1D\" showplotborder=\"1\" plotgradientcolor=\"\" plotbordercolor=\"F5BA00\" showcanvasbg=\"1\" showcanvasbase=\"1\" canvasbgcolor=\"ffffff\" canvasbgalpha=\"90\" canvasbasecolor=\"D3DBCA\" showalternatehgridcolor=\"0\" showborder=\"0\" canvasborderalpha=\"20\" divlinealpha=\"15\" showshadow=\"1\" plotfillangle=\"100\" plotfillratio=\"\" plotborderdashed=\"0\" plotborderdashlen=\"1\" anchorradius=\"3\" anchorbgcolor=\"FFFFFF\" anchorborderthickness=\"3\" linethickness=\"2\" canvasBorderThickness=\"1\" canvasBorderColor=\"74787C\" showFCMenuItem=\"0\" chartTopMargin=\"10\" chartBottomMargin=\"10\" chartLeftMargin=\"10\" chartRightMargin=\"10\" captionPadding=\"10\" labelPadding=\"0\" adjustDiv= \"0\" numDivLines=\"3\" PYAxisMinValue=\"0\" PYAxisMaxValue=\"100\" SYAxisMinValue=\"0\" SYAxisMaxValue=\"40\"> <categories> <category label=\"2.22\"/> <category label=\"2.23\" /> <category label=\"2.24\" /> <category label=\"2.25\" /> <category label=\"2.26\" /> <category label=\"2.27\" /> <category label=\"2.28\" /> </categories> <dataset seriesname=\"A\" color=\"F5BA00\"> <set value=\"8158\" hoverText=\"8158\"/> <set value=\"9549\" hoverText=\"9549\"/> <set value=\"9968\" hoverText=\"9968\"/> <set value=\"9580\" hoverText=\"9580\"/> <set value=\"11593\" hoverText=\"11593\"/> <set value=\"83\" hoverText=\"83\"/> <set value=\"173\" hoverText=\"173\"/> </dataset> <dataset seriesname=\"B\" parentYAxis=\"S\" lineThickness=\"2\" color=\"5AC724\" anchorSides=\"3\" anchorRadius=\"7\" anchorBorderThickness=\"1\" anchorBorderColor=\"5AC724\" anchorBgColor=\"5AC724\"> <set value=\"20.5\" hoverText=\"20.5%\"/> <set value=\"20.5\" hoverText=\"20.5%\"/> <set value=\"20.5\" hoverText=\"20.5%\"/> <set value=\"20.5\" hoverText=\"20.5%\"/> <set value=\"20.5\" hoverText=\"20.5%\"/> <set value=\"20.5\" hoverText=\"20.5%\"/> <set value=\"20.5\" hoverText=\"20.5%\"/> </dataset> <dataset seriesname=\"C\" parentYAxis=\"S\" lineThickness=\"2\" color=\"733AE0\" anchorSides=\"8\" anchorRadius=\"5\" anchorBorderThickness=\"1\" anchorBorderColor=\"733AE0\" anchorBgColor=\"733AE0\"> <set value=\"13.7\" hoverText=\"13.7%\"/> <set value=\"13.7\" hoverText=\"13.7%\"/> <set value=\"13.8\" hoverText=\"13.8%\"/> <set value=\"14.1\" hoverText=\"14.1%\"/> <set value=\"24.9\" hoverText=\"24.9%\"/> <set value=\"10.0\" hoverText=\"10.0%\"/> <set value=\"0.0\" hoverText=\"0.0%\"/> </dataset> <styles> <definition> <style name=\"CanvasXScaleAnim\" type=\"ANIMATION\" duration=\"1\" start=\"0\" /> <style name=\"CanvasYScaleAnim\" type=\"ANIMATION\" duration=\"1\" start=\"0\"/> <style name=\"CaptionStyle\" type=\"font\" font=\"Verdana\" size=\"14\" color=\"464547\" bold=\"1\" bgColor=\"F1F4F8\" borderColor=\"D7DBDF\" leftMargin=\"5\" rightMargin=\"5\" letterSpacing=\"2\"/> </definition> <application> <apply toObject=\"Caption\" styles=\"CaptionStyle\" /> <apply toObject=\"Canvas\" styles=\"CanvasXScaleAnim,CanvasYScaleAnim\" /> </application> </styles></chart>"; window.fillingChart(); window.onresize(); } </script> </body> </html> Share this post Link to post Share on other sites
Guest Sumedh Report post Posted March 4, 2013 Hi, Welcome to FusionCharts Forum! We have tested your sample code and it's working fine at our end. (we have tested the sample code using FusionCharts XT v3.3.0 files) Chart is getting updated on clicking the redraw button. Also, resizeTo function is also working fine at our end. Please find attached screen-shots for your reference. What browser version are you using at your end? send us the browser version details.(Send us the screen-shot of your issue.) Share this post Link to post Share on other sites
Luohui Report post Posted March 4, 2013 (edited) Hi, Welcome to FusionCharts Forum! We have tested your sample code and it's working fine at our end. (we have tested the sample code using FusionCharts XT v3.3.0 files) Chart is getting updated on clicking the redraw button. Also, resizeTo function is also working fine at our end. Please find attached screen-shots for your reference. What browser version are you using at your end? send us the browser version details.(Send us the screen-shot of your issue.) Edited March 4, 2013 by Luohui Share this post Link to post Share on other sites
Guest Sumedh Report post Posted March 5, 2013 Hi, Are you trying to render JavaScript charts or Flash charts? Share this post Link to post Share on other sites