king
2023-02-08 1f6d49bf15e6b50eeee1edc32022eb006b401835
src/tabviews/custom/components/chart/antv-bar-line/index.jsx
@@ -1499,6 +1499,8 @@
            barcolors[item[plot.Xaxis]] = plot.barcolors[i].color
          }
        })
      } else {
        barcolors = null
      }
      const ds = new DataSet()
@@ -1633,6 +1635,8 @@
      if (plot.$colors) {
        let limit = chartColors.length
        if (barcolors) {
        _chart.color(`${_typefield}*${plot.Xaxis}`, (key, label) => {
          if (barcolors[label]) {
            return barcolors[label]
@@ -1643,6 +1647,16 @@
            return chartColors[(colorIndex - 1) % limit]
          }
        })
        } else {
          _chart.color(`${_typefield}`, (key) => {
            if (plot.$colors.has(key)) {
              return plot.$colors.get(key)
            } else {
              colorIndex++
              return chartColors[(colorIndex - 1) % limit]
            }
          })
        }
      } else {
        _chart.color(_typefield)
      }
@@ -1697,6 +1711,7 @@
      if (plot.$colors) {
        let limit = chartColors.length
        if (barcolors) {
        _chart.color(`${_typefield}*${plot.Xaxis}`, (key, label) => {
          if (barcolors[label]) {
            return barcolors[label]
@@ -1708,6 +1723,16 @@
          }
        })
      } else {
          _chart.color(`${_typefield}`, (key) => {
            if (plot.$colors.has(key)) {
              return plot.$colors.get(key)
            } else {
              colorIndex++
              return chartColors[(colorIndex - 1) % limit]
            }
          })
        }
      } else {
        _chart.color(_typefield)
      }
      if (plot.label !== 'false') {