diff --git a/src/components/GoVChart/index.vue b/src/components/GoVChart/index.vue index 5d28ff84..1611105f 100644 --- a/src/components/GoVChart/index.vue +++ b/src/components/GoVChart/index.vue @@ -211,7 +211,7 @@ const createOrUpdateChart = ( const spec = transformHandler[chartProps.category || '']?.(chartProps) chart.updateSpec({ ...spec, data: toRaw(chartProps.dataset), dataset: undefined }, false, undefined, { change: false, - reMake: false, + reMake: true, reAnimate: true }) return true diff --git a/src/components/Pages/VChartItemSetting/Axis.vue b/src/components/Pages/VChartItemSetting/Axis.vue index 76f1135f..daf2e1b4 100644 --- a/src/components/Pages/VChartItemSetting/Axis.vue +++ b/src/components/Pages/VChartItemSetting/Axis.vue @@ -15,15 +15,15 @@ - + - + - + diff --git a/src/components/Pages/VChartItemSetting/Bar.vue b/src/components/Pages/VChartItemSetting/Bar.vue new file mode 100644 index 00000000..f031fb2e --- /dev/null +++ b/src/components/Pages/VChartItemSetting/Bar.vue @@ -0,0 +1,52 @@ + + + diff --git a/src/components/Pages/VChartItemSetting/Label.vue b/src/components/Pages/VChartItemSetting/Label.vue new file mode 100644 index 00000000..f1df09da --- /dev/null +++ b/src/components/Pages/VChartItemSetting/Label.vue @@ -0,0 +1,38 @@ + + + diff --git a/src/components/Pages/VChartItemSetting/index.ts b/src/components/Pages/VChartItemSetting/index.ts index dd8f7f0c..76dcaa44 100644 --- a/src/components/Pages/VChartItemSetting/index.ts +++ b/src/components/Pages/VChartItemSetting/index.ts @@ -1,4 +1,6 @@ import VChartGlobalSetting from './VChartGlobalSetting.vue' import Axis from './Axis.vue' +import Label from './Label.vue' +import Bar from './Bar.vue' -export { VChartGlobalSetting, Axis } +export { VChartGlobalSetting, Axis, Label, Bar } diff --git a/src/packages/chartConfiguration/vcharts/label.ts b/src/packages/chartConfiguration/vcharts/label.ts index 0e338162..f7d9ca7f 100644 --- a/src/packages/chartConfiguration/vcharts/label.ts +++ b/src/packages/chartConfiguration/vcharts/label.ts @@ -20,5 +20,63 @@ export const labelConfig = { label: '内部-居中', value: 'inside-center' } + ], + barPosition: [ + { + label: '外部', + value: 'outside' + }, + { + label: '内部', + value: 'inside' + }, + { + label: '顶部', + value: 'top' + }, + { + label: '底部', + value: 'bottom' + }, + { + label: '左侧', + value: 'left' + }, + { + label: '右侧', + value: 'right' + }, + { + label: '内部-顶', + value: 'inside-top' + }, + { + label: '内部-底', + value: 'inside-bottom' + }, + { + label: '内部-右', + value: 'inside-right' + }, + { + label: '内部-左', + value: 'inside-left' + }, + { + label: '顶部-右', + value: 'top-right' + }, + { + label: '顶部-左', + value: 'top-left' + }, + { + label: '底部-右', + value: 'bottom-right' + }, + { + label: '底部-左', + value: 'bottom-left' + } ] } diff --git a/src/packages/components/VChart/Bars/VChartBarCommon/config.ts b/src/packages/components/VChart/Bars/VChartBarCommon/config.ts index 1f035e86..c18ba01d 100644 --- a/src/packages/components/VChart/Bars/VChartBarCommon/config.ts +++ b/src/packages/components/VChart/Bars/VChartBarCommon/config.ts @@ -7,7 +7,7 @@ import axisThemeJson from '@/settings/vchartThemes/axis.theme.json' import { ChatCategoryEnum, IBarOption } from '../../index.d' import { merge, cloneDeep } from 'lodash' -export const includes = ['legends', 'tooltip'] +export const includes = ['legends', 'tooltip', 'label', 'bar'] export const option: IBarOption & { dataset?: any } = { // 图表配置 type: 'bar', diff --git a/src/packages/components/VChart/Bars/VChartBarCommon/config.vue b/src/packages/components/VChart/Bars/VChartBarCommon/config.vue index 9f15a51a..239a716c 100644 --- a/src/packages/components/VChart/Bars/VChartBarCommon/config.vue +++ b/src/packages/components/VChart/Bars/VChartBarCommon/config.vue @@ -3,11 +3,15 @@ + + + +