Skip to content

在API里找不到设置组间间隔,是没有这个功能吗? #16010

@AkenClub

Description

@AkenClub

Version

5.2.2

Steps to reproduce

如上这个效果,求助,代码设置如下:
`

const customSeries = []
this.chartData.seriesData.forEach(item => {
customSeries.push({
name: item.name,
type: 'bar',
data: item.data,
animationDuration,
barWidth: 30,
emphasis: {
focus: 'series'
}
})
})

  this.chart = echarts.init(this.$el, 'macarons')
  this.chart.setOption({
    title: {
      text: this.title
    },
    tooltip: {
      trigger: 'axis',
      showDelay: 10,
      axisPointer: { // 坐标轴指示器,坐标轴触发有效
        type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
      },
      textStyle: {
        color: '#fff'
      },
      formatter: (params) => {
        let sum = 0
        let mainTip = ''
        params.forEach((data, index) => {
          sum  = data.value
          mainTip  = (data.marker)   (data.seriesName   ':'   data.value)
          if (index !== params.length - 1) {
            mainTip  = '<br />'
          }
        })
        return `${params[0].axisValue}<br />总计:${sum}<br />${mainTip}`
      }
    },
    grid: {
      left: '0%',
      right: '1%',
      bottom: '2%',
      containLabel: true
    },
    xAxis: [{
      type: 'category',
      data: this.chartData.xAxisData,
      axisTick: {
        alignWithLabel: true
      }
    }],
    yAxis: [{
      type: 'value',
      axisTick: {
        show: false
      }
    }],
    legend: {
      left: 'right',
      top: '0%'
    },
    series: customSeries
  })

`

What is expected?

image

What is actually happening?

没有API
设置组间间隔image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions