diff --git a/core/frontend/src/views/chart/chart/util.js b/core/frontend/src/views/chart/chart/util.js index f577e96c70..340459a379 100644 --- a/core/frontend/src/views/chart/chart/util.js +++ b/core/frontend/src/views/chart/chart/util.js @@ -1746,7 +1746,7 @@ export const TYPE_CONFIGS = [ icon: 'stock-line', properties: [ 'color-selector', - 'size-selector', + 'size-selector-ant-v', 'tooltip-selector-ant-v', 'x-axis-selector-ant-v', 'y-axis-selector-ant-v', @@ -1760,7 +1760,7 @@ export const TYPE_CONFIGS = [ 'customColor', 'alpha' ], - 'size-selector': [ + 'size-selector-ant-v': [ 'lineWidth', 'lineSymbol', 'lineSymbolSize', diff --git a/core/frontend/src/views/chart/components/shapeAttr/SizeSelectorAntV.vue b/core/frontend/src/views/chart/components/shapeAttr/SizeSelectorAntV.vue index 5a63ca5278..668092dd5b 100644 --- a/core/frontend/src/views/chart/components/shapeAttr/SizeSelectorAntV.vue +++ b/core/frontend/src/views/chart/components/shapeAttr/SizeSelectorAntV.vue @@ -1909,23 +1909,23 @@ export default { this.sizeForm.gaugePercentLabel = this.sizeForm.gaugePercentLabel === false ? false : DEFAULT_SIZE.gaugePercentLabel if (this.chart.type !== 'table-pivot') { let { xaxis, yaxis } = this.chart - if (!(xaxis instanceof Object)) { + if (!(xaxis instanceof Object) && xaxis) { xaxis = JSON.parse(xaxis) } - if (!(yaxis instanceof Object)) { + if (!(yaxis instanceof Object) && yaxis) { yaxis = JSON.parse(yaxis) } let allAxis = xaxis if (this.chart.type === 'table-normal') { allAxis = allAxis.concat(yaxis) } - if (allAxis.length && this.sizeForm.showIndex) { + if (allAxis?.length && this.sizeForm.showIndex) { allAxis.unshift({ dataeaseName: SERIES_NUMBER_FIELD, name: this.sizeForm.indexLabel }) } - if (!allAxis.length) { + if (!allAxis?.length) { this.sizeForm.tableFieldWidth?.splice(0) this.fieldColumnWidth.fieldId = '' this.fieldColumnWidth.width = '' @@ -1982,7 +1982,10 @@ export default { }, changeBarSizeCase(modifyName) { if (!this.doChange) { - this.doChange = _.debounce(() => this.debounceChange(modifyName), 200) + this.doChange = _.debounce(() => { + this.debounceChange(modifyName) + this.doChange = undefined + }, 200) } this.doChange() },