2013-04-25 271 views
0

我正在使用FusionCharts,但我遇到了一些問題。我在下面的快照中索引不爲0(我用紅色標記)在X軸上得到0。FusionCharts:X軸值不像預期的那樣

另一個問題是該行沒有繪製?

這是數字我得到: enter image description here

這是我的XML代碼:

<chart caption="" xaxisname="Quantity (finished items)" yaxisname="Cost" numdivlines="9" lineThickness="2" showvalues="0" showLegend="1" canvasPadding="0" legendIconScale="1.4" numVisiblePlot="15"> 
<categories> 
<category x="0" label="0"/> 
<category x="5000" label="5000"/> 
<category x="10000" label="10000"/> 
<category x="15000" label="15000"/> 
<category x="20000" label="20000"/> 
<category x="25000" label="25000"/> 
<category x="30000" label="30000"/> 
<category x="35000" label="35000"/> 
<category x="40000" label="40000"/> 
<category x="45000" label="45000"/> 
<category x="50000" label="50000"/> 
<category x="55000" label="55000"/> 
<category x="60000" label="60000"/> 
<category x="65000" label="65000"/> 
<category x="70000" label="70000"/> 
</categories> 
<dataset seriesName="Flow Name" drawLine="1 " anchorSides="20" anchorRadius="5"> 
<set x="0" y="169.13"/> 
<set x="5000" y="9046.95"/> 
<set x="10000" y="17924.78"/> 
<set x="15000" y="26802.6"/> 
<set x="20000" y="35680.42"/> 
<set x="25000" y="44558.25"/> 
<set x="30000" y="53436.07"/> 
<set x="35000" y="62313.9"/> 
<set x="40000" y="71191.72"/> 
<set x="45000" y="80069.54"/> 
<set x="50000" y="88947.38"/> 
<set x="55000" y="97825.2"/> 
<set x="60000" y="106703.02"/> 
<set x="65000" y="115580.84"/> 
<set x="70000" y="124458.66"/> 
</dataset> 
<dataset seriesName="B1" drawLine="1 " anchorSides="3" anchorRadius="5"> 
<set x="0" y="123.16"/> 
<set x="5000" y="271.37"/> 
<set x="10000" y="419.59"/> 
<set x="15000" y="567.8"/> 
<set x="20000" y="716.02"/> 
<set x="25000" y="864.23"/> 
<set x="30000" y="1012.45"/> 
<set x="35000" y="1160.66"/> 
<set x="40000" y="1308.88"/> 
<set x="45000" y="1457.09"/> 
<set x="50000" y="1605.31"/> 
<set x="55000" y="1753.52"/> 
<set x="60000" y="1901.73"/> 
<set x="65000" y="2049.95"/> 
<set x="70000" y="2198.16"/> 
</dataset> 
</chart> 
+0

你如何生成融合圖表。你是否通過某些操作傳遞了值,或者它是硬編碼的。 – 2013-04-25 13:13:32

+0

您需要提供更多信息,例如 - 圖表類型是什麼?你可以用示例數據及其數據XML/JSON放置截圖嗎?例如,柱形圖不會開始顯示邊緣的標籤。 – 2013-04-25 18:27:43

+0

我編輯了問題 – mohammad 2013-04-26 04:39:59

回答

0

能否請你嘗試在<chart>設置 「canvasPadding」 屬性'0' XML的元素,看看是否有幫助?

+0

不,它什麼都沒做 – mohammad 2013-04-26 13:03:58

2

看來您選擇的chartType不是Scatter(從屏幕截圖推斷,它是MSColumn2D或某些其他多系列柱狀圖)。無論您在代碼中哪裏做new FusionCharts(/*...*/);,請嘗試將圖表類型更改爲Scatter。參考the FusionCharts documentation link explaining how to change chart type

+0

謝謝你,那是非常有用的 – mohammad 2013-04-28 08:08:29

+0

不客氣。請注意,如果答案對您有幫助,您需要將答案標記爲已接受(答案投票按鈕下方的複選標記)。 – 2013-04-30 04:59:28