king
2023-11-19 0e5c395b974b187b4227ed86dac746131425052a
src/menu/components/chart/antv-bar/index.jsx
@@ -581,6 +581,29 @@
        fill: '#fff'
      }
    }
    let label = plot.label
    if (Bar_axis.length) {
      if (label === 'false') {
        plot.customs.forEach(item => {
          if (!Bar_axis.includes(item.type)) return
          if (item.label === 'true') {
            label = 'true'
          }
        })
      } else {
        let reset = true
        plot.customs.forEach(item => {
          if (!Bar_axis.includes(item.type)) return
          if (item.label === 'true') {
            reset = false
          }
        })
        if (reset) {
          label = 'false'
        }
      }
    }
    if (plot.label === 'top') {
      lablecfg.offset = -5
@@ -682,13 +705,13 @@
        } else {
          _chart.color('key')
        }
        if (plot.label !== 'false') {
        if (label !== 'false') {
          _chart.label('value*key', (value, key) => {
            if (plot.show === 'percent') {
              value = value + '%'
            }
            if (plot.label === 'true' && plot.labelColor === 'custom' && colors.has(key)) {
            if (label === 'true' && plot.labelColor === 'custom' && colors.has(key)) {
              lablecfg.style.fill = colors.get(key)
            }
            return {
@@ -733,13 +756,13 @@
        } else {
          _chart.color('key')
        }
        if (plot.label !== 'false') {
        if (label !== 'false') {
          _chart.label('value*key', (value, key) => {
            if (plot.show === 'percent') {
              value = value + '%'
            }
            if (plot.label === 'true' && plot.labelColor === 'custom' && colors.has(key)) {
            if (label === 'true' && plot.labelColor === 'custom' && colors.has(key)) {
              lablecfg.style.fill = colors.get(key)
            }