king
2022-09-18 0f6153ab337c4ecca5579a79b03f3ba5f831e0c4
src/menu/components/chart/antv-bar/chartcompile/index.jsx
@@ -262,20 +262,41 @@
      }
    })
    if (config.plot.correction) {
      delete config.plot.correction // 数据修正(已弃用)
      config.plot.barSize = 35
    let plot = fromJS(config.plot).toJS()
    if (plot.correction) {
      delete plot.correction // 数据修正(已弃用)
      plot.barSize = 35
    }
    if (plot.datatype !== 'statistics') {
      if (plot.colors) {
        plot.colors = plot.colors.map(item => {
          if (fieldName[item.type]) {
            item.label = fieldName[item.type]
          }
          return item
        })
      }
      if (plot.customs) {
        plot.customs = plot.customs.map(item => {
          if (fieldName[item.type]) {
            item.name = fieldName[item.type]
          }
          return item
        })
      }
    }
    this.setState({
      visible: true,
      view: 'normal',
      ramp: config.plot.ramp || 'false',
      datatype: config.plot.datatype || 'query',
      ramp: plot.ramp || 'false',
      datatype: plot.datatype || 'query',
      fieldName: fieldName,
      plot: fromJS(config.plot).toJS(),
      baseFormlist: getBaseForm(config.plot, config.columns),
      formlist: getOptionForm(config.plot, config.columns)
      plot: plot,
      baseFormlist: getBaseForm(plot, config.columns),
      formlist: getOptionForm(plot, config.columns)
    })
  }