最近把FusionCharts 3.2.1升級到XT版本了,默認情況下,我利用以下代碼渲染JS圖表:
FusionCharts.setCurrentRenderer('javascript');
此前,我們的系統被設置為從XML數據中渲染Flash圖表,并且我未對代碼做任何修改。我在控制臺中看到下列錯誤:
Uncaught ReferenceError: parseTooltext is not defined FusionCharts.HC.Widgets.js:193
p.series FusionCharts.HC.Widgets.js:193
p.chart FusionCharts.HC.Widgets.js:120
R.init FusionCharts.HC.js:521
p.init FusionCharts.HC.Widgets.js:105
g.createChart FusionCharts.HC.js:460
j.extend.render FusionCharts.HC.js:782
a.renderer.render FusionCharts.js:56
a.extend.render FusionCharts.js:64
dash.renderXML dashboard.js:40
(anonymous function) dashboard.js:227
c jquery-1.10.2.js:3048
p.fireWith jquery-1.10.2.js:3160
k jquery-1.10.2.js:8235
r jquery-1.10.2.js:8778
dash.renderXML (dashboard.js, line 40) calls chart.setDataXml() with the following xml:
<?xml version="1.0" encoding="utf-8"?>
<chart showLimits="0" showAboutMenuItem="0" chartRightMargin="8" lowerLimit="-100" clickURL="JavaScript:dash.change_metric(0);" gaugeEndAngle="0" tickValueStep="1" bgColor="ffffff" tickValueDistance="14" autoScale="0" palette="1" gaugeStartAngle="180" showTickValues="1" chartTopMargin="5" exportEnabled="1" chartLeftMargin="8" chartBottomMargin="5" showBorder="0" imageSaveURL="/data/image" exportFormats="PNG=Save as Image" decimals="1" showTickMarks="1" upperLimit="100">
<colorRange>
<color code="FFFFFF" maxValue="-15.6" minValue="-100.0"/>
<color code="FF0000" maxValue="1.7" minValue="-15.6"/>
<color code="f2f20c" maxValue="14.5" minValue="1.7"/>
<color code="0cf20c" maxValue="62.2" minValue="14.5"/>
<color code="FFFFFF" maxValue="100.0" minValue="62.2"/>
</colorRange>
<dials>
<dial rearExtension="5" toolText="Amazon.com: 62.2" id="brand1" value="62.2"/>
</dials>
<trendpoints>
<point color="666666" alpha="100" thickness="2" startValue="7.21319806914" displayValue=" "/>
</trendpoints>
<styles>
<definition>
<style bgColor="ffffff" type="font" name="defaultfont"/>
</definition>
<application>
<apply toObject="value" styles="defaultfont"/>
<apply toObject="limitvalues" styles="defaultfont"/>
</application>
</styles>
</chart>
無法渲染儀表,他們顯示為空白框。
打破零回復...
登錄 慧都網發表評論