Перекрытие панелей электронных диаграмм - PullRequest
0 голосов
/ 05 мая 2020

Я изо всех сил пытаюсь понять, почему полосы перекрываются. Посмотрите на картинку ниже

Вот мой вариант.

this.options = {
    backgroundColor: echarts.bg,
    color: [colors.warningLight, colors.infoLight, colors.dangerLight, colors.successLight, colors.primaryLight],
    title: {
      text: 'WaitStats',
      textStyle: {
        color: echarts.textColor,
      },
    },
    toolbox: {
      left: 'right',
      feature: {
          saveAsImage: {
            title: 'Save As picture',
          },
          magicType: {
            type: ['line', 'bar'],
            title: { 
              line: 'Line Chart',
              bar: 'Bar Chart'
            },
          }
      }
    },
    tooltip: {},
    legend: {
      left: '15%',
      width: '72%',
      textStyle: {
        color: echarts.textColor,
      },
    },
    grid: {
      left: '1%',
      right: '1%',
      bottom: '7%',
      top: '12%',
      containLabel: true,
    },
    xAxis: [
      {
        type: 'category',
        boundaryGap: false,
        data: this.seriesX,
        axisTick: {
          alignWithLabel: true,
        },
        axisLine: {
          lineStyle: {
            color: echarts.axisLineColor,
          },
        },
        axisLabel: {
          //rotate: 90,
          textStyle: {
            color: echarts.textColor,
          },
        },
      },
    ],
    yAxis: [
      {
        type: 'value',
        min: 0,
        max: 100,
        interval: 10,
        axisLabel: {
            formatter: '{value} %',
            textStyle: {
              color: echarts.textColor,
            },
        },
        axisLine: {
          lineStyle: {
            color: echarts.axisLineColor,
          },
        },
        splitLine: {
          lineStyle: {
            color: echarts.splitLineColor,
          },
        },
      },
    ],
    dataZoom: [
      {
        show: true,
        start: 0,
        end: 100
      },
      {
          type: 'inside',
          start: 0,
          end: 100
      },
    ],
    series: this.seriesData
  };

Спасибо за вашу помощь! .................................................. .................................................. . ................................................. .................................................. ..

1 Ответ

1 голос
/ 06 мая 2020

Измените свой код на:

xAxis: [{
  //...
    boundaryGap: true
  //...
}]
...