king
2021-06-10 5cfe6db94c1449810a44660b299dba8e7e98e5c5
src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx
@@ -162,6 +162,28 @@
  let xfields = columns.filter(item => /^Nvarchar/ig.test(item.datatype))
  let yfields = columns.filter(item => /^(Int|Decimal)/ig.test(item.datatype))
  let labelOptions = [{
    value: 'false',
    text: '隐藏'
  }, {
    value: 'true',
    text: '显示'
  }]
  if (card.chartType === 'bar') {
    labelOptions[1].text = '外部'
    labelOptions.push(...[{
      value: 'top',
      text: '顶部'
    }, {
      value: 'middle',
      text: '中间'
    }, {
      value: 'bottom',
      text: '底部'
    }])
  }
  return [
    {
      type: 'radio',
@@ -289,17 +311,25 @@
        text: '百分比'
      }]
    }, {
      type: 'radio',
      type: labelOptions.length > 2 ? 'select' : 'radio',
      key: 'label',
      label: '标注值',
      label: '标签',
      initVal: card.label || 'false',
      required: false,
      options: [{
        value: 'true',
        text: '显示'
      options: labelOptions
      }, {
        value: 'false',
        text: '隐藏'
      type: 'radio',
      key: 'labelColor',
      label: '标签颜色',
      initVal: card.labelColor || 'system',
      tooltip: '使用系统色时,使用色系选项设置的系统颜色,使用自定义为颜色设置中定义的图形颜色。',
      required: false,
      options: [{
        value: 'system',
        text: '系统'
      }, {
        value: 'custom',
        text: '自定义'
      }]
    // }, {
    //   type: 'radio',