feat: supply option panel of gloabl and bar chart setting

This commit is contained in:
skie1997
2024-12-20 15:44:24 +08:00
parent 026e4809c8
commit 152786c652
20 changed files with 8049 additions and 32 deletions
@@ -4,16 +4,39 @@ import { CreateComponentType } from '@/packages/index.d'
import { vChartOptionPrefixHandle } from '@/packages/public/vChart'
import data from './data.json'
import cloneDeep from 'lodash/cloneDeep'
import { type ISpec } from '@visactor/vchart'
import axisThemeJson from '@/settings/vchartThemes/axis.theme.json'
import { IBarOption } from '../../index.d'
export const includes = ['legends']
export const option: ISpec & { dataset?: any } = {
export const includes = ['legends', 'tooltip']
export const option: IBarOption & { dataset?: any } = {
// 图表配置
type: 'bar',
dataset: data,
xField: 'State',
yField: 'Population',
seriesField: 'Age',
stack: true
stack: true,
// 业务配置(后续会被转换为图表spec)
category: VChartBarStackConfig.category,
xAxis: {
name: 'x轴',
...axisThemeJson,
grid: {
...axisThemeJson.grid,
visible: false
}
},
yAxis: {
name: 'y轴',
...axisThemeJson,
grid: {
...axisThemeJson.grid,
style: {
...axisThemeJson.grid.style,
lineDash: [3, 3]
}
}
}
}
export default class Config extends PublicConfigClass implements CreateComponentType {