web123456

echarts' endValue sets the fixed length

  • setChartOptions (charts) {
  • option = {
  • tooltip: {
  • show: true,
  • trigger: 'axis',
  • confine: true
  • },
  • legend: {
  • show: false
  • },
  • grid: {
  • left: '2%',
  • right: '10%',
  • bottom: '5%',
  • containLabel: true,
  • top: '20',
  • },
  • xAxis: {
  • type: 'category',
  • boundaryGap: false,
  • data: this.data.,
  • splitLine: {
  • lineStyle: {
  • type: 'dashed'
  • }
  • }
  • },
  • yAxis: {
  • type: 'value'
  • },
  • dataZoom: [{
  • show: true,
  • type: 'inside',
  • xAxisIndex: [0],
  • startValue: 0,
  • endValue: this.data.dateTab == '0' ? 8 : 6,
  • rangeMode: ["value", "value"]
  • }, {
  • show: true,
  • type: 'inside',
  • xAxisIndex: [0],
  • startValue: 0,
  • endValue: this.data.dateTab == '0' ? 8 : 6,
  • rangeMode: ["value", "value"]
  • }],
  • color: this.data.barColor,
  • series: this.data.
  • };
  • (option, true);
  • },