echarts图表按照时分,日,月,维度展示时间数据

时间:2021-09-01
本文章向大家介绍echarts图表按照时分,日,月,维度展示时间数据,主要包括echarts图表按照时分,日,月,维度展示时间数据使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

echarts图表按照时分,日,月,维度展示时间数据

      {
        color: ["#00C5CD", "#FF8510"],
        dataZoom: this.dataZoom,
        xAxis: {
          type: "time",
          min: "dataMin",
          max: "dataMax",
          boundaryGap: false,
          axisLabel: {
            // 格式化横轴坐标时间刻度
            formatter: {
              year: "{yyyy}年",
              month: "{M}月",
              day: "{MM}/{dd}",
              hour: "{HH}:{mm}",
              minute: "{HH}:{mm}",
              second: "{HH}:{mm}:{ss}",
              millisecond: "{hh}:{mm}:{ss} {SSS}",
              none: "{yyyy}-{MM}-{dd} {hh}:{mm}:{ss} {SSS}",
            },
          },
          // x轴显示竖线
          splitLine: {
            show: true,
            lineStyle: {
              // 显示虚线
              type: [10, 10],
              color: "#e0e0e0",
              dashOffset: 5,
            },
          },
          axisLine: {
            show: true,
            lineStyle: {
              color: "#e0e0e0",
            },
          },
        },
        yAxis: {
          type: "value",
          name: this.yUnit,
          splitLine: {
            show: false,
          },
          axisLine: {
            show: false,
          },
        },
        series: this.getSeries,
      }
打不死的小强

原文地址:https://www.cnblogs.com/mggahui/p/15215587.html