Fusioncharts 线是舍入值

Fusioncharts line is rounding values

我使用的是最新版本的 Fusionchart (3.13.1-sr.1)。我正在尝试插入此图表:

{
"chart": {
    "caption": "Capacitat",
    "subcaption": "Capacitat",
    "decimalSeparator ": ",",
    "decimals": "2",
    "exportEnabled": "1",
    "yaxisname": "Preu €/MWh",
    "xaxisname": "Date",
    "yaxisminValue": "0,0464",
    "yaxismaxValue": "10,0488",
    "pixelsPerPoint": "0",
    "pixelsPerLabel": "30",
    "lineThickness": "1",
    "compactdatamode": "1",
    "dataseparator": "|",
    "labelHeight": "30",
    "scrollheight": "10",
    "flatScrollBars": "1",
    "scrollShowButtons": "0",
    "yAxisValueDecimals": "2",
    "forceYAxisValueDecimals": "1",
    "scrollColor": "#cccccc",
    "theme": "fusion"
    },
"categories": [
    {
        "category": "1/6/2018 12:00:00| 2/6/2018 12:00:00| 3/6/2018 12:00:00| 1/6/2018 1:00:00| 2/6/2018 1:00:00| 3/6/2018 1:00:00| 1/6/2018 2:00:00| 2/6/2018 2:00:00| 3/6/2018 2:00:00| 1/6/2018 3:00:00| 2/6/2018 3:00:00| 3/6/2018 3:00:00| 1/6/2018 4:00:00| 2/6/2018 4:00:00| 3/6/2018 4:00:00| 1/6/2018 5:00:00| 2/6/2018 5:00:00| 3/6/2018 5:00:00| 1/6/2018 6:00:00| 2/6/2018 6:00:00| 3/6/2018 6:00:00| 1/6/2018 7:00:00| 2/6/2018 7:00:00| 3/6/2018 7:00:00| 1/6/2018 8:00:00| 2/6/2018 8:00:00| 3/6/2018 8:00:00| 1/6/2018 9:00:00| 2/6/2018 9:00:00| 3/6/2018 9:00:00| 1/6/2018 10:00:00| 2/6/2018 10:00:00| 3/6/2018 10:00:00| 1/6/2018 11:00:00| 2/6/2018 11:00:00| 3/6/2018 11:00:00| 1/6/2018 12:00:00| 2/6/2018 12:00:00| 3/6/2018 12:00:00| 1/6/2018 1:00:00| 2/6/2018 1:00:00| 3/6/2018 1:00:00| 1/6/2018 2:00:00| 2/6/2018 2:00:00| 3/6/2018 2:00:00| 1/6/2018 3:00:00| 2/6/2018 3:00:00| 3/6/2018 3:00:00| 1/6/2018 4:00:00| 2/6/2018 4:00:00| 3/6/2018 4:00:00| 1/6/2018 5:00:00| 2/6/2018 5:00:00| 3/6/2018 5:00:00| 1/6/2018 6:00:00| 2/6/2018 6:00:00| 3/6/2018 6:00:00| 1/6/2018 7:00:00| 2/6/2018 7:00:00| 3/6/2018 7:00:00| 1/6/2018 8:00:00| 2/6/2018 8:00:00| 3/6/2018 8:00:00| 1/6/2018 9:00:00| 2/6/2018 9:00:00| 3/6/2018 9:00:00| 1/6/2018 10:00:00| 2/6/2018 10:00:00| 3/6/2018 10:00:00| 1/6/2018 11:00:00| 2/6/2018 11:00:00| 3/6/2018 11:00:00"
    }
],
"dataset": [
    {
        "seriesname": "Preu",
        "data": "0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|8,374000|8,374000|8,374000|8,374000|8,374000|8,374000|8,374000|8,374000|8,374000|8,374000|8,374000|8,374000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000"
    }
]
}

结果图表四舍五入。在示例中,我希望看到 4.30,但它显示的是 4.0

当您在数据源的数据对象中提供值为 4,304000 且小数点分隔符为“,”时。

那么您需要在数据源中设置属性"inDecimalSeparator"为字符“,”,以指定输入值将使用“,”作为小数点分隔符的图表。

由于您尚未设置此属性,因此图表采用了所有值,直到所有绘图的字符“,”。例如:4,304000 被认为是 4,因此显示为 4.00。

查找示例 fiddle 使用上述属性修改提供的数据源: http://jsfiddle.net/n2L4ekg3/2/

{
  "chart": {
    "caption": "Capacitat",
    "subcaption": "Capacitat",
    "decimalSeparator ": ",",
    "decimals": "2",
    "exportEnabled": "1",
    "yaxisname": "Preu €/MWh",
    "xaxisname": "Date",
    "yaxisminValue": "0,0464",
    "yaxismaxValue": "10,0488",
    "pixelsPerPoint": "0",
    "pixelsPerLabel": "30",
    "lineThickness": "1",
    "compactdatamode": "1",
    "dataseparator": "|",
    "labelHeight": "30",
    "scrollheight": "10",
    "flatScrollBars": "1",
    "scrollShowButtons": "0",
    "yAxisValueDecimals": "2",
    "forceYAxisValueDecimals": "1",
    "scrollColor": "#cccccc",
    "inDecimalSeparator": ",",
    "theme": "fusion"
  },
  "categories": [{
    "category": "1/6/2018 12:00:00| 2/6/2018 12:00:00| 3/6/2018 12:00:00| 1/6/2018 1:00:00| 2/6/2018 1:00:00| 3/6/2018 1:00:00| 1/6/2018 2:00:00| 2/6/2018 2:00:00| 3/6/2018 2:00:00| 1/6/2018 3:00:00| 2/6/2018 3:00:00| 3/6/2018 3:00:00| 1/6/2018 4:00:00| 2/6/2018 4:00:00| 3/6/2018 4:00:00| 1/6/2018 5:00:00| 2/6/2018 5:00:00| 3/6/2018 5:00:00| 1/6/2018 6:00:00| 2/6/2018 6:00:00| 3/6/2018 6:00:00| 1/6/2018 7:00:00| 2/6/2018 7:00:00| 3/6/2018 7:00:00| 1/6/2018 8:00:00| 2/6/2018 8:00:00| 3/6/2018 8:00:00| 1/6/2018 9:00:00| 2/6/2018 9:00:00| 3/6/2018 9:00:00| 1/6/2018 10:00:00| 2/6/2018 10:00:00| 3/6/2018 10:00:00| 1/6/2018 11:00:00| 2/6/2018 11:00:00| 3/6/2018 11:00:00| 1/6/2018 12:00:00| 2/6/2018 12:00:00| 3/6/2018 12:00:00| 1/6/2018 1:00:00| 2/6/2018 1:00:00| 3/6/2018 1:00:00| 1/6/2018 2:00:00| 2/6/2018 2:00:00| 3/6/2018 2:00:00| 1/6/2018 3:00:00| 2/6/2018 3:00:00| 3/6/2018 3:00:00| 1/6/2018 4:00:00| 2/6/2018 4:00:00| 3/6/2018 4:00:00| 1/6/2018 5:00:00| 2/6/2018 5:00:00| 3/6/2018 5:00:00| 1/6/2018 6:00:00| 2/6/2018 6:00:00| 3/6/2018 6:00:00| 1/6/2018 7:00:00| 2/6/2018 7:00:00| 3/6/2018 7:00:00| 1/6/2018 8:00:00| 2/6/2018 8:00:00| 3/6/2018 8:00:00| 1/6/2018 9:00:00| 2/6/2018 9:00:00| 3/6/2018 9:00:00| 1/6/2018 10:00:00| 2/6/2018 10:00:00| 3/6/2018 10:00:00| 1/6/2018 11:00:00| 2/6/2018 11:00:00| 3/6/2018 11:00:00"
  }],
  "dataset": [{
    "seriesname": "Preu",
    "data": "0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|0,058000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|8,374000|8,374000|8,374000|8,374000|8,374000|8,374000|8,374000|8,374000|8,374000|8,374000|8,374000|8,374000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000|4,304000"
  }]
}

文档参考:https://www.fusioncharts.com/dev/chart-guide/chart-configurations/number-format#customize-thousand-and-decimal-separator-4