ZingChart 的 Scale-Y 刻度为散点图绘制错误

Scale-Y ticks of ZingChart plotted wrong for scatter chart

Zing 图表的散点图未正确设置 y 轴。以下代码用于渲染散点图。

   zingchart.render({
            id:'itemMapChart',
            data:{
                type: 'scatter',
                series: srsdata,
                "background-color": "none",
                scaleX:{
                    guide: {
                        "line-color": "none"
                    },
                },
                scaleY:{
                    guide: {
                        "line-color": "none"
                    },
                },
                plotarea:{
                    margin: "dynamic",
                    padding : "48px",
                },
                plot : {
                  marker : {
                    size : 15
                  }
                },
            },
            height:800,
            width: "100%" 
        });

srsdata 是以下结构的数组:

var srstemp = {
  values: [
   [val.dishqty, val.dishprice]
  ],
  "text": val.dishname
};

x 值为整数,y 值为浮点数。我尝试将 y 值设置为 int,然后秤工作正常。但是当它保持为浮点数时,图形看起来像这样:https://postimg.org/image/ge4nfej3n/

有人能告诉我这是什么问题吗?

听起来您的值是字符串,而不是数字类型。我会 parseFloat 您的值,以便保留小数值。