鍍金池/ 問答/HTML/ echarts曲線圖的比例寬度不一致?

echarts曲線圖的比例寬度不一致?

echarts的橫坐標(biāo)的沒有具體的標(biāo)示, X坐標(biāo)沒有一個格子來提示, 下面有圖具體說明
clipboard.png
以下是標(biāo)準(zhǔn)格式
clipboard.png

js

/* 蒸發(fā) */
createChartSix() {
  this.$http
    .get(this.$api.dataChart)
    .then(rsp => {
      if (rsp.status == 200) {
        let resData = rsp.data.data.device_1;
        let key = "蒸發(fā)_1";
        let xAxisData = resData[key].names;
        let seriesData = resData[key].values;
        let yMin = Math.min.apply(null, seriesData);
        let yMax = Math.max.apply(null, seriesData);
        var home_echarts_evaporation = echarts.init(
          document.getElementById("home_echarts_evaporation")
        );
        var speed = {
          grid: {
            left: 60
          },
          xAxis: {
            type: "category",
            data: xAxisData,
            axisLabel: {
              show: true,
              textStyle: {
                color: "#fff"
              }
            },
            axisLabel: {
              show: true,
              textStyle: {
                color: "#fff"
              }
            },
            axisLine: {
              lineStyle: {
                color: "#285555"
              }
            }
          },
          yAxis: {
            type: "value",
            min: yMin - 5,
            max: yMax + 5,
            axisLine: {
              lineStyle: {
                color: "#275454"
              }
            },
            axisLabel: {
              show: true,
              textStyle: {
                color: "#fff"
              }
            },
            splitLine: {
              lineStyle: {
                color: ["#0a3435"]
              }
            }
          },
          lineStyle: {
            color: "#0066ff"
          },
          series: [
            {
              data: seriesData,
              type: "line",
              smooth: true
            }
          ]
        };
        var resize = {
          width: 415,
          height: 290
        };
        home_echarts_evaporation.resize(resize);
        home_echarts_evaporation.setOption(speed);
      } else {
        throw rsp.message;
      }
    })
    .catch(err => {
      console.log("createChartOne有異常", err);
    });
回答
編輯回答
痞性

哪里不一致了???
Y軸 0-1-2-3-4-5 間隔,只是Y軸沒有把 1和3的標(biāo)出來而已

參考:http://echarts.baidu.com/opti...

2018年1月7日 10:08