The proportional width of the echarts graph is inconsistent.

The horizontal coordinates of

echarts are not specifically marked, and the X coordinates do not have a grid to indicate. Here is a figure that specifies
clipboard.png

clipboard.png

.

js

/*  */
createChartSix() {
  this.$http
    .get(this.$api.dataChart)
    .then(rsp => {
      if (rsp.status == 200) {
        let resData = rsp.data.data.device_1;
        let key = "_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: "-sharpfff"
              }
            },
            axisLabel: {
              show: true,
              textStyle: {
                color: "-sharpfff"
              }
            },
            axisLine: {
              lineStyle: {
                color: "-sharp285555"
              }
            }
          },
          yAxis: {
            type: "value",
            min: yMin - 5,
            max: yMax + 5,
            axisLine: {
              lineStyle: {
                color: "-sharp275454"
              }
            },
            axisLabel: {
              show: true,
              textStyle: {
                color: "-sharpfff"
              }
            },
            splitLine: {
              lineStyle: {
                color: ["-sharp0a3435"]
              }
            }
          },
          lineStyle: {
            color: "-sharp0066ff"
          },
          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);
    });
Feb.26,2021

what is the inconsistency?
Y axis 0-1-2-3-4-5 interval, but the Y axis does not mark 1 and 3

.

reference: http://echarts.baidu.com/opti.

Menu