king
2023-12-12 49f09cc6f8ff8c30a75ed1a9d6f510b69b73962a
src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx
@@ -240,10 +240,11 @@
    shapes = [
      { field: 'rect', label: 'rect(矩形)' },
      { field: 'hollow-rect', label: 'hollow-rect(空心矩形)' },
      { field: 'line', label: 'line(线条)' },
      { field: 'tick', label: 'tick(波动)' },
      // { field: 'funnel', label: 'funnel' },
      { field: 'pyramid', label: 'pyramid(角锥)' }
      // { field: 'hollow', label: 'hollow(空心矩形)' },
      // { field: 'line', label: 'line(线条)' },
      // { field: 'tick', label: 'tick(波动)' },
      // { field: 'funnel', label: 'funnel(漏斗图)' },
      { field: 'pyramid', label: 'pyramid(金字塔)' }
    ]
  }
@@ -270,6 +271,28 @@
      value: 'bottom',
      label: '底部'
    }])
  }
  let axis = []
  if (card.grid !== 'hidden') {
    axis.push('grid')
  }
  if (card.x_line !== 'hidden') {
    axis.push('x_line')
  }
  if (card.y_line !== 'hidden') {
    axis.push('y_line')
  }
  if (card.tick !== 'hidden') {
    axis.push('tick')
  }
  let tickVals = []
  if (card.x_label !== 'hidden') {
    tickVals.push('x_label')
  }
  if (card.y_label !== 'hidden') {
    tickVals.push('y_label')
  }
  return [
@@ -379,6 +402,7 @@
      label: '变换',
      initval: card.transpose || 'false',
      tooltip: '横纵坐标轴交换',
      forbid: card.chartType === 'line',
      required: false,
      options: [{
        value: 'true',
@@ -473,26 +497,11 @@
      }]
    }, {
      type: 'radio',
      field: 'repeat',
      label: '重复数据',
      initval: card.repeat || 'unrepeat',
      required: false,
      options: [{
        value: 'unrepeat',
        label: '去重'
      }, {
        value: 'average',
        label: '平均'
      }, {
        value: 'cumsum',
        label: '累加'
      }]
    }, {
      type: 'radio',
      field: 'coordinate',
      label: '坐标',
      initval: card.coordinate || 'angle',
      required: false,
      forbid: card.chartType === 'line',
      options: [{
        value: 'angle',
        label: '二维坐标'
@@ -501,32 +510,70 @@
        label: '极坐标'
      }]
    }, {
      type: 'radio',
      field: 'grid',
      label: '网格线',
      initval: card.grid || 'show',
      type: 'checkbox',
      field: 'axis',
      label: '坐标轴',
      initval: axis,
      required: false,
      options: [{
        value: 'show',
        label: '显示'
        value: 'grid',
        label: '网格线'
      }, {
        value: 'hidden',
        label: '隐藏'
      }]
        value: 'x_line',
        label: 'X轴'
      }, {
        value: 'y_line',
        label: 'Y轴'
      }, {
        value: 'tick',
        label: '刻度线'
      }],
      controlFields: [
        {field: 'lineColor', notNull: true},
      ]
    }, {
      type: 'radio',
      field: 'y_line',
      label: 'y轴边线',
      initval: card.y_line || 'hidden',
      tooltip: '图形左侧或右侧的边线。',
      type: 'checkbox',
      field: 'tickVals',
      label: '刻度值',
      initval: tickVals,
      required: false,
      options: [{
        value: 'show',
        label: '显示'
        value: 'x_label',
        label: 'X轴'
      }, {
        value: 'hidden',
        label: '隐藏'
      }]
        value: 'y_label',
        label: 'Y轴'
      }],
      controlFields: [
        {field: 'color', notNull: true},
      ]
    // }, {
    //   type: 'radio',
    //   field: 'grid',
    //   label: '网格线',
    //   initval: card.grid || 'show',
    //   required: false,
    //   options: [{
    //     value: 'show',
    //     label: '显示'
    //   }, {
    //     value: 'hidden',
    //     label: '隐藏'
    //   }]
    // }, {
    //   type: 'radio',
    //   field: 'y_line',
    //   label: 'y轴边线',
    //   initval: card.y_line || 'hidden',
    //   tooltip: '图形左侧或右侧的边线。',
    //   required: false,
    //   options: [{
    //     value: 'show',
    //     label: '显示'
    //   }, {
    //     value: 'hidden',
    //     label: '隐藏'
    //   }]
    }, {
      type: 'radio',
      field: 'download',
@@ -599,17 +646,17 @@
      required: false
    }, {
      type: 'color',
      field: 'color',
      label: '刻度值颜色',
      initval: card.color || 'rgba(0, 0, 0, 0.65)',
      tooltip: '刻度值的文字颜色。',
      field: 'lineColor',
      label: '坐标轴颜色',
      initval: card.lineColor || '',
      tooltip: '坐标轴线的颜色,包括x轴、y轴、网格线、刻度线。',
      allowClear: true,
      required: false
    }, {
      type: 'color',
      field: 'lineColor',
      label: '轴线颜色',
      initval: card.lineColor,
      tooltip: '坐标轴线的颜色,包括x轴、y轴及网格线。',
      field: 'color',
      label: '刻度值颜色',
      initval: card.color || '',
      allowClear: true,
      required: false
    }, {