From 9041866e9c7cbc5dd1d1b61d3d47c49e0bf587b8 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 23 May 2022 13:23:39 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=89=B9=E9=87=8F=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../canvas/custom-component/UserView.vue | 10 +- frontend/src/lang/en.js | 3 + frontend/src/lang/tw.js | 3 + frontend/src/lang/zh.js | 3 + frontend/src/store/index.js | 40 +- frontend/src/views/chart/chart/util.js | 1680 ++++++++++++++++- .../component-style/LegendSelector.vue | 43 +- .../component-style/LegendSelectorAntV.vue | 41 +- .../component-style/SplitSelector.vue | 57 +- .../component-style/SplitSelectorAntV.vue | 29 +- .../component-style/TitleSelector.vue | 45 +- .../component-style/TitleSelectorAntV.vue | 41 +- .../component-style/XAxisSelector.vue | 73 +- .../component-style/XAxisSelectorAntV.vue | 66 +- .../component-style/YAxisExtSelector.vue | 93 +- .../component-style/YAxisExtSelectorAntV.vue | 65 +- .../component-style/YAxisSelector.vue | 85 +- .../component-style/YAxisSelectorAntV.vue | 65 +- .../components/shape-attr/ColorSelector.vue | 61 +- .../components/shape-attr/LabelSelector.vue | 57 +- .../shape-attr/LabelSelectorAntV.vue | 48 +- .../components/shape-attr/SizeSelector.vue | 282 ++- .../shape-attr/SizeSelectorAntV.vue | 593 +++--- .../components/shape-attr/TooltipSelector.vue | 33 +- .../shape-attr/TooltipSelectorAntV.vue | 25 +- .../chart/components/shape-attr/TotalCfg.vue | 55 +- frontend/src/views/chart/view/ChartEdit.vue | 13 +- frontend/src/views/chart/view/ChartStyle.vue | 35 +- .../views/chart/view/ChartStyleBatchSet.vue | 4 +- 29 files changed, 2819 insertions(+), 829 deletions(-) diff --git a/frontend/src/components/canvas/custom-component/UserView.vue b/frontend/src/components/canvas/custom-component/UserView.vue index ebc89f8173..e3c931960e 100644 --- a/frontend/src/components/canvas/custom-component/UserView.vue +++ b/frontend/src/components/canvas/custom-component/UserView.vue @@ -407,17 +407,17 @@ export default { const updateParams = { 'id': this.chart.id, 'stylePriority': 'view' } if (param.custom === 'customAttr') { const sourceCustomAttr = JSON.parse(this.sourceCustomAttrStr) - sourceCustomAttr[param.property] = param.value + sourceCustomAttr[param.property][param.value.modifyName] = param.value[param.value.modifyName] this.sourceCustomAttrStr = JSON.stringify(sourceCustomAttr) this.chart.customAttr = this.sourceCustomAttrStr updateParams['customAttr'] = this.sourceCustomAttrStr } else if (param.custom === 'customStyle') { const sourceCustomStyle = JSON.parse(this.sourceCustomStyleStr) // view's title use history - if (param.property === 'text') { - param.value.title = sourceCustomStyle.text.title - } - sourceCustomStyle[param.property] = param.value + // if (param.property === 'text') { + // param.value.title = sourceCustomStyle.text.title + // } + sourceCustomStyle[param.property][param.value.modifyName] = param.value[param.value.modifyName] this.sourceCustomStyleStr = JSON.stringify(sourceCustomStyle) this.chart.customStyle = this.sourceCustomStyleStr updateParams['customStyle'] = this.sourceCustomStyleStr diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index f3fed2f1e4..348729085a 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -2024,5 +2024,8 @@ export default { port: 'Port', user: 'User', passwd: 'Password' + }, + plugin_style: { + border: 'Border' } } diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index b94053cb9b..bb3bf25c6a 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -2035,5 +2035,8 @@ export default { port: '端口', user: '用戶名', passwd: '密碼' + }, + plugin_style: { + border: '边框' } } diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index 9a2d58c1f9..bcc4f0f0ea 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -2051,5 +2051,8 @@ export default { time: '操作时间', export: '导出', search_by_key: '搜索详情' + }, + plugin_style: { + border: '边框' } } diff --git a/frontend/src/store/index.js b/frontend/src/store/index.js index 98eb050ce5..b11a992a94 100644 --- a/frontend/src/store/index.js +++ b/frontend/src/store/index.js @@ -119,6 +119,7 @@ const data = { // Currently selected components curBatchOptComponents: [], mixProperties: [], + mixPropertiesInner: {}, batchOptChartInfo: null, batchOptViews: {}, // properties changed @@ -552,15 +553,6 @@ const data = { const viewBaseInfo = state.componentViewsData[id] // get properties const viewConfig = state.allViewRender.filter(item => item.render === viewBaseInfo.render && item.value === viewBaseInfo.type) - const viewProperties = viewConfig ? viewConfig[0].properties : [] - if (state.mixProperties.length > 0) { - // If it exists , taking the intersection - state.mixProperties = state.mixProperties.filter(property => viewProperties.indexOf(property) > -1) - } else { - // If it doesn't exist, assignment directly - state.mixProperties = deepCopy(viewProperties) - } - if (viewConfig && viewConfig.length > 0) { state.batchOptViews[id] = viewConfig[0] this.commit('setBatchOptChartInfo') @@ -570,16 +562,27 @@ const data = { setBatchOptChartInfo(state) { let render = null let type = null + let allTypes = '' let isPlugin = null state.mixProperties = [] + state.mixPropertiesInner = {} + let mixPropertiesTemp = [] + let mixPropertyInnerTemp = {} if (state.batchOptViews && JSON.stringify(state.batchOptViews) !== '{}') { for (const key in state.batchOptViews) { - if (state.mixProperties.length > 0) { + if (mixPropertiesTemp.length > 0) { // If it exists , taking the intersection - state.mixProperties = state.mixProperties.filter(property => state.batchOptViews[key].properties.indexOf(property) > -1) + mixPropertiesTemp = mixPropertiesTemp.filter(property => state.batchOptViews[key].properties.indexOf(property) > -1) + // 根据当前的mixPropertiesTemp 再对 mixPropertyInnerTemp 进行过滤 + mixPropertiesTemp.forEach(propertyInnerItem => { + if (mixPropertyInnerTemp[propertyInnerItem] && state.batchOptViews[key].propertyInner[propertyInnerItem]) { + mixPropertyInnerTemp[propertyInnerItem] = mixPropertyInnerTemp[propertyInnerItem].filter(propertyInnerItemValue => state.batchOptViews[key].propertyInner[propertyInnerItem].indexOf(propertyInnerItemValue) > -1) + } + }) } else { // If it doesn't exist, assignment directly - state.mixProperties = deepCopy(state.batchOptViews[key].properties) + mixPropertiesTemp = deepCopy(state.batchOptViews[key].properties) + mixPropertyInnerTemp = deepCopy(state.batchOptViews[key].propertyInner) } if (render && render !== state.batchOptViews[key].render) { @@ -588,6 +591,7 @@ const data = { render = state.batchOptViews[key].render } + allTypes = allTypes + '-' + state.batchOptViews[key].value if (type && type !== state.batchOptViews[key].value) { type = 'mix' } else { @@ -600,6 +604,16 @@ const data = { isPlugin = state.batchOptViews[key].isPlugin } } + mixPropertiesTemp.forEach(property => { + if (mixPropertyInnerTemp[property] && mixPropertyInnerTemp[property].length) { + state.mixPropertiesInner[property] = mixPropertyInnerTemp[property] + state.mixProperties.push(property) + } + }) + + // if (type && type === 'mix') { + // type = type + '-' + allTypes + // } // Assembly history settings 'customAttr' & 'customStyle' state.batchOptChartInfo = { 'mode': 'batchOpt', @@ -618,6 +632,7 @@ const data = { // Currently selected components state.curBatchOptComponents = [] state.mixProperties = [] + state.mixPropertyInnder = {} state.batchOptChartInfo = null state.batchOptViews = {} state.changeProperties = { @@ -636,6 +651,7 @@ const data = { // Currently selected components state.curBatchOptComponents = [] state.mixProperties = [] + state.mixPropertyInnder = {} state.batchOptChartInfo = null state.batchOptViews = {} state.changeProperties = { diff --git a/frontend/src/views/chart/chart/util.js b/frontend/src/views/chart/chart/util.js index 86e3662b45..13aa623460 100644 --- a/frontend/src/views/chart/chart/util.js +++ b/frontend/src/views/chart/chart/util.js @@ -38,7 +38,33 @@ export const TYPE_CONFIGS = [ 'color-selector', 'size-selector-ant-v', 'title-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'tableHeaderBgColor', + 'tableItemBgColor', + 'tableFontColor', + 'tableBorderColor', + 'alpha' + ], + 'size-selector-ant-v': [ + 'tableTitleFontSize', + 'tableItemFontSize', + 'tableHeaderAlign', + 'tableItemAlign', + 'tableTitleHeight', + 'tableItemHeight', + 'tableColumnMode' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ] + } }, { render: 'antv', @@ -50,7 +76,35 @@ export const TYPE_CONFIGS = [ 'color-selector', 'size-selector-ant-v', 'title-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'tableHeaderBgColor', + 'tableItemBgColor', + 'tableFontColor', + 'tableBorderColor', + 'alpha' + ], + 'size-selector-ant-v': [ + 'tablePageMode', + 'tablePageSize', + 'tableTitleFontSize', + 'tableItemFontSize', + 'tableHeaderAlign', + 'tableItemAlign', + 'tableTitleHeight', + 'tableItemHeight', + 'tableColumnMode' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ] + } }, { render: 'antv', @@ -63,7 +117,37 @@ export const TYPE_CONFIGS = [ 'size-selector-ant-v', 'total-cfg', 'title-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'tableHeaderBgColor', + 'tableItemBgColor', + 'tableFontColor', + 'tableBorderColor', + 'alpha' + ], + 'size-selector-ant-v': [ + 'tableTitleFontSize', + 'tableItemFontSize', + 'tableHeaderAlign', + 'tableItemAlign', + 'tableTitleHeight', + 'tableItemHeight', + 'tableColumnMode' + ], + 'total-cfg': [ + 'row', + 'col' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ] + } }, { render: 'antv', @@ -75,7 +159,27 @@ export const TYPE_CONFIGS = [ 'color-selector', 'size-selector-ant-v', 'title-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'quotaColor', + 'dimensionColor' + ], + 'size-selector-ant-v': [ + 'quotaFontSize', + 'dimensionShow', + 'dimensionFontSize', + 'spaceSplit' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ] + } }, { render: 'antv', @@ -87,7 +191,27 @@ export const TYPE_CONFIGS = [ 'color-selector', 'size-selector-ant-v', 'title-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'quotaColor', + 'dimensionColor' + ], + 'size-selector-ant-v': [ + 'quotaFontSize', + 'dimensionShow', + 'dimensionFontSize', + 'spaceSplit' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ] + } }, { render: 'antv', @@ -100,7 +224,31 @@ export const TYPE_CONFIGS = [ 'size-selector-ant-v', 'label-selector-ant-v', 'title-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector-ant-v': [ + 'gaugeMax', + 'gaugeStartAngle', + 'gaugeEndAngle' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ] + } }, { render: 'antv', @@ -113,7 +261,32 @@ export const TYPE_CONFIGS = [ 'size-selector-ant-v', 'label-selector-ant-v', 'title-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector-ant-v': [ + 'liquidShape', + 'liquidMax', + 'liquidSize' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'isItalic', + 'isBolder' + ] + } }, { render: 'antv', @@ -130,7 +303,61 @@ export const TYPE_CONFIGS = [ 'y-axis-selector-ant-v', 'title-selector-ant-v', 'legend-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector-ant-v': [ + 'lineWidth', + 'lineSymbol', + 'lineSymbolSize', + 'lineSmooth' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'x-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'y-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ], + 'legend-selector-ant-v': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition' + ] + } }, { render: 'antv', @@ -147,7 +374,61 @@ export const TYPE_CONFIGS = [ 'y-axis-selector-ant-v', 'title-selector-ant-v', 'legend-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector-ant-v': [ + 'lineWidth', + 'lineSymbol', + 'lineSymbolSize', + 'lineSmooth' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'x-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'y-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ], + 'legend-selector-ant-v': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition' + ] + } }, { @@ -165,7 +446,60 @@ export const TYPE_CONFIGS = [ 'y-axis-selector-ant-v', 'title-selector-ant-v', 'legend-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector-ant-v': [ + 'barDefault', + 'barGap' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color', + 'position' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'x-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'y-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ], + 'legend-selector-ant-v': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition' + ] + } }, { render: 'antv', @@ -175,13 +509,67 @@ export const TYPE_CONFIGS = [ icon: 'bar-stack', properties: [ 'color-selector', + 'size-selector-ant-v', 'label-selector-ant-v', 'tooltip-selector-ant-v', 'x-axis-selector-ant-v', 'y-axis-selector-ant-v', 'title-selector-ant-v', 'legend-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector-ant-v': [ + 'barDefault', + 'barGap' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color', + 'position' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'x-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'y-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ], + 'legend-selector-ant-v': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition' + ] + } }, { render: 'antv', @@ -196,7 +584,49 @@ export const TYPE_CONFIGS = [ 'x-axis-selector-ant-v', 'y-axis-selector-ant-v', 'title-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color', + 'position' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'x-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'y-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ] + } }, { render: 'antv', @@ -213,7 +643,61 @@ export const TYPE_CONFIGS = [ 'y-axis-selector-ant-v', 'title-selector-ant-v', 'legend-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector-ant-v': [ + 'barDefault', + 'barGap' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color', + 'position' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'x-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'axisValue', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'y-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ], + 'legend-selector-ant-v': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition' + ] + } }, { render: 'antv', @@ -230,9 +714,63 @@ export const TYPE_CONFIGS = [ 'y-axis-selector-ant-v', 'title-selector-ant-v', 'legend-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector-ant-v': [ + 'barDefault', + 'barGap' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color', + 'position' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'x-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'axisValue', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'y-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'axisValue', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ], + 'legend-selector-ant-v': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition' + ] + } }, - { render: 'antv', category: 'chart.chart_type_distribute', @@ -246,7 +784,42 @@ export const TYPE_CONFIGS = [ 'tooltip-selector-ant-v', 'title-selector-ant-v', 'legend-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector-ant-v': [ + 'pieInnerRadius', + 'pieOuterRadius' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color', + 'position' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ], + 'legend-selector-ant-v': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition' + ] + } }, { render: 'antv', @@ -261,7 +834,41 @@ export const TYPE_CONFIGS = [ 'tooltip-selector-ant-v', 'title-selector-ant-v', 'legend-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector-ant-v': [ + 'pieInnerRadius', + 'pieOuterRadius' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ], + 'legend-selector-ant-v': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition' + ] + } }, { render: 'antv', @@ -277,7 +884,42 @@ export const TYPE_CONFIGS = [ 'split-selector-ant-v', 'title-selector-ant-v', 'legend-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector-ant-v': [ + 'radarShape', + 'radarSize' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color', + 'position' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ], + 'legend-selector-ant-v': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition' + ] + } }, { render: 'antv', @@ -291,7 +933,37 @@ export const TYPE_CONFIGS = [ 'tooltip-selector-ant-v', 'title-selector-ant-v', 'legend-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ], + 'legend-selector-ant-v': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition' + ] + } }, { render: 'antv', @@ -303,7 +975,25 @@ export const TYPE_CONFIGS = [ 'color-selector', 'tooltip-selector-ant-v', 'title-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ] + } }, { @@ -321,7 +1011,59 @@ export const TYPE_CONFIGS = [ 'y-axis-selector-ant-v', 'title-selector-ant-v', 'legend-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector-ant-v': [ + 'scatterSymbol', + 'scatterSymbolSize' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'x-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'y-axis-selector-ant-v': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine', + 'axisForm', + 'axisLabel' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ], + 'legend-selector-ant-v': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition' + ] + } }, { render: 'antv', @@ -335,7 +1077,38 @@ export const TYPE_CONFIGS = [ 'tooltip-selector-ant-v', 'title-selector-ant-v', 'legend-selector-ant-v' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'label-selector-ant-v': [ + 'show', + 'fontSize', + 'color', + 'position' + ], + 'tooltip-selector-ant-v': [ + 'show', + 'textStyle' + ], + 'title-selector-ant-v': [ + 'show', + 'title', + 'fontSize', + 'color', + 'isItalic', + 'isBolder' + ], + 'legend-selector-ant-v': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition' + ] + } }, /* 下面是echarts图表类型 */ { @@ -348,7 +1121,31 @@ export const TYPE_CONFIGS = [ 'color-selector', 'size-selector', 'title-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'tableHeaderBgColor', + 'tableItemBgColor', + 'tableFontColor', + 'alpha' + ], + 'size-selector': [ + 'tableTitleFontSize', + 'tableItemFontSize', + 'tableTitleHeight', + 'tableItemHeight', + 'tableColumnMode' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'isItalic', + 'isBolder' + ] + } }, { render: 'echarts', @@ -360,6 +1157,33 @@ export const TYPE_CONFIGS = [ 'color-selector', 'size-selector', 'title-selector' + ], + propertyInner: { + 'color-selector': [ + 'tableHeaderBgColor', + 'tableItemBgColor', + 'tableFontColor', + 'alpha' + ] + }, + 'size-selector': [ + 'tablePageMode', + 'tablePageSize', + 'tableTitleFontSize', + 'tableItemFontSize', + 'tableTitleHeight', + 'tableItemHeight', + 'tableColumnMode' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' ] }, @@ -373,7 +1197,29 @@ export const TYPE_CONFIGS = [ 'color-selector', 'size-selector', 'title-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'quotaColor', + 'dimensionColor' + ], + 'size-selector': [ + 'quotaFontSize', + 'dimensionShow', + 'dimensionFontSize', + 'spaceSplit' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ] + } }, { render: 'echarts', @@ -385,7 +1231,28 @@ export const TYPE_CONFIGS = [ 'color-selector', 'size-selector', 'title-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'quotaColor', + 'dimensionColor' + ], + 'size-selector': [ + 'quotaFontSize', + 'dimensionShow', + 'dimensionFontSize', + 'spaceSplit' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'isItalic', + 'isBolder' + ] + } }, { render: 'echarts', @@ -397,8 +1264,38 @@ export const TYPE_CONFIGS = [ 'color-selector', 'size-selector', 'label-selector', - 'title-selector', - ] + 'title-selector' + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'gaugeMin', + 'gaugeMax', + 'gaugeStartAngle', + 'gaugeEndAngle' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'position', + 'formatter', + 'gaugeFormatter' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ] + } }, { @@ -416,7 +1313,63 @@ export const TYPE_CONFIGS = [ 'y-axis-selector', 'title-selector', 'legend-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'lineWidth', + 'lineSymbol', + 'lineSymbolSize', + 'lineSmooth' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'x-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'y-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ], + 'legend-selector': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition', + 'vPosition' + ] + } }, { render: 'echarts', @@ -433,7 +1386,63 @@ export const TYPE_CONFIGS = [ 'y-axis-selector', 'title-selector', 'legend-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'lineWidth', + 'lineSymbol', + 'lineSymbolSize', + 'lineSmooth' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'x-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'y-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ], + 'legend-selector': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition', + 'vPosition' + ] + } }, { render: 'echarts', @@ -451,7 +1460,77 @@ export const TYPE_CONFIGS = [ 'y-axis-ext-selector', 'title-selector', 'legend-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'barDefault', + 'barWidth', + 'barGap', + 'lineWidth', + 'lineType', + 'lineSymbol', + 'lineSymbolSize', + 'lineArea', + 'bubble_scatterSymbol', + 'bubble_scatterSymbolSize' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'position', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'x-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'y-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'y-ext-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ], + 'legend-selector': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition', + 'vPosition' + ] + } }, { @@ -469,7 +1548,63 @@ export const TYPE_CONFIGS = [ 'y-axis-selector', 'title-selector', 'legend-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'barDefault', + 'barWidth', + 'barGap' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'position', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'x-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'y-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ], + 'legend-selector': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition', + 'vPosition' + ] + } }, { render: 'echarts', @@ -486,7 +1621,63 @@ export const TYPE_CONFIGS = [ 'y-axis-selector', 'title-selector', 'legend-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'barDefault', + 'barWidth', + 'barGap' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'position', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'x-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'y-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ], + 'legend-selector': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition', + 'vPosition' + ] + } }, { render: 'echarts', @@ -503,7 +1694,64 @@ export const TYPE_CONFIGS = [ 'y-axis-selector', 'title-selector', 'legend-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'barDefault', + 'barWidth', + 'barGap' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'position', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'x-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'axisValue', + 'splitLine' + ], + 'y-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ], + 'legend-selector': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition', + 'vPosition' + ] + } }, { render: 'echarts', @@ -520,7 +1768,65 @@ export const TYPE_CONFIGS = [ 'y-axis-selector', 'title-selector', 'legend-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'barDefault', + 'barWidth', + 'barGap' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'position', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'x-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'axisValue', + 'splitLine' + ], + 'y-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'axisValue', + 'splitLine' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ], + 'legend-selector': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition', + 'vPosition' + ] + } }, { @@ -536,7 +1842,49 @@ export const TYPE_CONFIGS = [ 'tooltip-selector', 'title-selector', 'legend-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'pieInnerRadius', + 'pieOuterRadius' + ], + 'label-selector': [ + 'show', + 'labelLine', + 'fontSize', + 'color', + 'position', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ], + 'legend-selector': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition', + 'vPosition' + ] + } }, { render: 'echarts', @@ -551,7 +1899,50 @@ export const TYPE_CONFIGS = [ 'tooltip-selector', 'title-selector', 'legend-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'pieInnerRadius', + 'pieOuterRadius', + 'pieRoseType', + 'pieRoseRadius' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'position', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ], + 'legend-selector': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition', + 'vPosition' + ] + } }, { render: 'echarts', @@ -567,7 +1958,55 @@ export const TYPE_CONFIGS = [ 'split-selector', 'title-selector', 'legend-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'radarShape', + 'radarSize' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'position', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'split-selector': [ + 'name', + 'axisLine', + 'axisLabel', + 'splitLine', + 'splitArea' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ], + 'legend-selector': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition', + 'vPosition' + ] + } }, { render: 'echarts', @@ -581,7 +2020,39 @@ export const TYPE_CONFIGS = [ 'label-selector', 'tooltip-selector', 'title-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'treemapWidth', + 'treemapHeight' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ] + } }, { @@ -599,7 +2070,62 @@ export const TYPE_CONFIGS = [ 'y-axis-selector', 'title-selector', 'legend-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'scatterSymbol', + 'scatterSymbolSize' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'position', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'x-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'y-axis-selector': [ + 'show', + 'position', + 'name', + 'nameTextStyle', + 'splitLine' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ], + 'legend-selector': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition', + 'vPosition' + ] + } }, { render: 'echarts', @@ -614,7 +2140,47 @@ export const TYPE_CONFIGS = [ 'tooltip-selector', 'title-selector', 'legend-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + 'funnelWidth' + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'position', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ], + 'legend-selector': [ + 'show', + 'icon', + 'orient', + 'textStyle', + 'hPosition', + 'vPosition' + ] + } }, { @@ -629,7 +2195,39 @@ export const TYPE_CONFIGS = [ 'label-selector', 'tooltip-selector', 'title-selector' - ] + ], + propertyInner: { + 'color-selector': [ + 'value', + 'alpha' + ], + 'size-selector': [ + + ], + 'label-selector': [ + 'show', + 'fontSize', + 'color', + 'position', + 'formatter' + ], + 'tooltip-selector': [ + 'show', + 'trigger', + 'textStyle', + 'formatter' + ], + 'title-selector': [ + 'show', + 'title', + 'fontSize', + 'color', + 'hPosition', + 'vPosition', + 'isItalic', + 'isBolder' + ] + } } ] diff --git a/frontend/src/views/chart/components/component-style/LegendSelector.vue b/frontend/src/views/chart/components/component-style/LegendSelector.vue index 87d475e4cb..924acb2d48 100644 --- a/frontend/src/views/chart/components/component-style/LegendSelector.vue +++ b/frontend/src/views/chart/components/component-style/LegendSelector.vue @@ -2,12 +2,12 @@