diff --git a/frontend/src/views/chart/components/shape-attr/ColorSelectorExt.vue b/frontend/src/views/chart/components/shape-attr/ColorSelectorExt.vue new file mode 100644 index 0000000000..902097eaed --- /dev/null +++ b/frontend/src/views/chart/components/shape-attr/ColorSelectorExt.vue @@ -0,0 +1,416 @@ + + + + + + + + + + {{ $t('chart.system_case') }} + + + + + + {{ option.name }} + + + + {{ $t('commons.reset') }} + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ item.name }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index f0f1952b0c..4bcd1e3fd8 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -1587,6 +1587,7 @@ export default { const view = this.buildParam(true, 'chart', false, switchType) if (!view) return viewEditSave(this.panelInfo.id, view).then(() => { + this.getData(this.param.id) bus.$emit('view-in-cache', { type: 'propChange', viewId: this.param.id }) }) }, @@ -2369,7 +2370,7 @@ export default { resetViewCacheCallBack(_this.param.id, _this.panelInfo.id, function(rsp) { _this.changeEditStatus(false) _this.getChart(_this.param.id, 'panel') - // _this.getData(_this.param.id) + _this.getData(_this.param.id) bus.$emit('view-in-cache', { type: 'propChange', viewId: _this.param.id }) }) }, @@ -2405,6 +2406,8 @@ export default { this.view.customAttr.label.position = 'middle' } } + // reset custom colors + this.view.customAttr.color.seriesColors = [] }, valueFormatter(item) { diff --git a/frontend/src/views/chart/view/ChartStyle.vue b/frontend/src/views/chart/view/ChartStyle.vue index 974e803a1f..642688bd79 100644 --- a/frontend/src/views/chart/view/ChartStyle.vue +++ b/frontend/src/views/chart/view/ChartStyle.vue @@ -30,7 +30,15 @@ {{ $t('chart.shape_attr') }} + import PluginCom from '@/views/system/plugin/PluginCom' import ColorSelector from '@/views/chart/components/shape-attr/ColorSelector' +import ColorSelectorExt from '@/views/chart/components/shape-attr/ColorSelectorExt' import SizeSelector from '@/views/chart/components/shape-attr/SizeSelector' import SizeSelectorAntV from '@/views/chart/components/shape-attr/SizeSelectorAntV' import LabelSelector from '@/views/chart/components/shape-attr/LabelSelector' @@ -295,7 +304,13 @@ export default { TotalCfg, TooltipSelectorAntV, TooltipSelector, - LabelSelectorAntV, LabelSelector, SizeSelectorAntV, SizeSelector, ColorSelector, PluginCom + LabelSelectorAntV, + LabelSelector, + SizeSelectorAntV, + SizeSelector, + ColorSelector, + PluginCom, + ColorSelectorExt }, props: { chart: {