wangrong
2026-08-30 4c949c0dc9bcae785c281c9d8125295f09810b15
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { AbstractChartView, ChartLibraryType, ChartRenderType } from '../../types'
import { useI18n } from '@/hooks/web/useI18n'
 
const { t } = useI18n()
/**
 * 富文本图表
 */
export class RichTextChartView extends AbstractChartView {
  properties: EditorProperty[] = [
    'background-overall-component',
    'border-style',
    'threshold',
    'function-cfg'
  ]
  propertyInner: EditorPropertyInner = {
    'background-overall-component': ['all'],
    'border-style': ['all'],
    threshold: ['tableThreshold'],
    'function-cfg': ['emptyDataStrategy']
  }
  axis: AxisType[] = ['xAxis', 'yAxis', 'filter']
  axisConfig: AxisConfig = {
    xAxis: {
      name: `${t('chart.dimension')}`,
      type: 'd',
      allowEmpty: true
    },
    yAxis: {
      name: `${t('chart.quota')}`,
      type: 'q',
      allowEmpty: true
    }
  }
  constructor() {
    super(ChartRenderType.CUSTOM, ChartLibraryType.RICH_TEXT, 'rich-text')
  }
}