FusionCharts: X-axis values not like expected

◇◆丶佛笑我妖孽 提交于 2019-12-14 04:09:30

问题


I am using FusionCharts but I'm facing some problems. I get 0 on X-axis at index not 0 (I marked it in a red color) on the the snapshot below.

Another problem is that the line is not drawn?

This is the figure i get :

This is my XML code:

    <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>

回答1:


It seems that the chartType you are selecting is not Scatter (inferring from screenshot, it is MSColumn2D or some other Multi-series Column chart). Wherever in your code you are doing new FusionCharts(/*...*/);, try changing the chart type to Scatter. Refer to the FusionCharts documentation link explaining how to change chart type




回答2:


Could you please try setting "canvasPadding" attribute to '0' in the <chart> element of the XML and see if that helps?



来源:https://stackoverflow.com/questions/16214046/fusioncharts-x-axis-values-not-like-expected

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!