king
2024-03-07 cdd5b449130ea4d7223fde4f414a11a7d0c33d6d
src/menu/components/chart/antv-bar/index.jsx
@@ -337,6 +337,9 @@
          if (plot.show === 'percent') {
            value = value + '%'
          }
          if (plot.labelUnit) {
            value = value + plot.labelUnit
          }
          let _color = color
          if (plot.labelColor === 'custom' && colors.has(key)) {
@@ -720,6 +723,9 @@
            if (plot.show === 'percent') {
              value = value + '%'
            }
            if (plot.labelUnit) {
              value = value + plot.labelUnit
            }
            if (label === 'true' && plot.labelColor === 'custom' && colors.has(key)) {
              lablecfg.style.fill = colors.get(key)
@@ -770,6 +776,9 @@
          _chart.label('value*key', (value, key) => {
            if (plot.show === 'percent') {
              value = value + '%'
            }
            if (plot.labelUnit) {
              value = value + plot.labelUnit
            }
            if (label === 'true' && plot.labelColor === 'custom' && colors.has(key)) {
@@ -842,6 +851,9 @@
            if (item.show === 'percent') {
              value = value + '%'
            }
            if (plot.labelUnit) {
              value = value + plot.labelUnit
            }
            if (plot.label === 'true' && plot.labelColor === 'custom') {
              lablecfg.style.fill = item.color
@@ -884,6 +896,9 @@
          _chart.label(item.name, (value) => {
            if (item.show === 'percent') {
              value = value + '%'
            }
            if (plot.labelUnit) {
              value = value + plot.labelUnit
            }
            let _color = color
@@ -977,12 +992,31 @@
      if (plot.grid === 'hidden') {
        yc.grid = null
      }
      if (plot.y_line === 'show') {
      if (plot.tick === 'hidden') {
        xc.tickLine = null
      }
      if (plot.x_line === 'hidden') {
        xc.line = null
      }
      if (plot.y_line === 'hidden') {
        yc.line = null
      } else {
        yc.line = {style: { stroke: '#D1D2CE' }}
      }
      if (plot.x_label === 'hidden') {
        xc.label = null
      }
      if (plot.y_label === 'hidden') {
        yc.label = null
      }
      if (plot.lineColor) {
        xc.tickLine = {style: { stroke: plot.lineColor }}
        xc.line = { style: { stroke: plot.lineColor } }
        if (xc.tickLine !== null) {
          xc.tickLine = {style: { stroke: plot.lineColor }}
        }
        if (xc.line !== null) {
          xc.line = { style: { stroke: plot.lineColor } }
        }
        if (yc.grid !== null) {
          yc.grid = { line: { style: { stroke: plot.lineColor } }}
        }
@@ -1119,6 +1153,9 @@
            if (plot.show === 'percent') {
              value = value + '%'
            }
            if (plot.labelUnit) {
              value = value + plot.labelUnit
            }
            if (plot.label === 'true' && plot.labelColor === 'custom' && colors.has(key)) {
              lablecfg.style.fill = colors.get(key)
@@ -1180,6 +1217,9 @@
            if (plot.show === 'percent') {
              value = value + '%'
            }
            if (plot.labelUnit) {
              value = value + plot.labelUnit
            }
            if (plot.label === 'true' && plot.labelColor === 'custom' && colors.has(key)) {
              lablecfg.style.fill = colors.get(key)