Skip to content

Commit c2f60c0

Browse files
Merge pull request dataease#12473 from dataease/pr@dev@chart-stock-line-style-fix
fix(视图): 修复K线图批量调整线条及折点样式无效的问题
2 parents c1e8f10 + 8eac87d commit c2f60c0

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

core/frontend/src/views/chart/chart/util.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,7 +1746,7 @@ export const TYPE_CONFIGS = [
17461746
icon: 'stock-line',
17471747
properties: [
17481748
'color-selector',
1749-
'size-selector',
1749+
'size-selector-ant-v',
17501750
'tooltip-selector-ant-v',
17511751
'x-axis-selector-ant-v',
17521752
'y-axis-selector-ant-v',
@@ -1760,7 +1760,7 @@ export const TYPE_CONFIGS = [
17601760
'customColor',
17611761
'alpha'
17621762
],
1763-
'size-selector': [
1763+
'size-selector-ant-v': [
17641764
'lineWidth',
17651765
'lineSymbol',
17661766
'lineSymbolSize',

core/frontend/src/views/chart/components/shapeAttr/SizeSelectorAntV.vue

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1909,23 +1909,23 @@ export default {
19091909
this.sizeForm.gaugePercentLabel = this.sizeForm.gaugePercentLabel === false ? false : DEFAULT_SIZE.gaugePercentLabel
19101910
if (this.chart.type !== 'table-pivot') {
19111911
let { xaxis, yaxis } = this.chart
1912-
if (!(xaxis instanceof Object)) {
1912+
if (!(xaxis instanceof Object) && xaxis) {
19131913
xaxis = JSON.parse(xaxis)
19141914
}
1915-
if (!(yaxis instanceof Object)) {
1915+
if (!(yaxis instanceof Object) && yaxis) {
19161916
yaxis = JSON.parse(yaxis)
19171917
}
19181918
let allAxis = xaxis
19191919
if (this.chart.type === 'table-normal') {
19201920
allAxis = allAxis.concat(yaxis)
19211921
}
1922-
if (allAxis.length && this.sizeForm.showIndex) {
1922+
if (allAxis?.length && this.sizeForm.showIndex) {
19231923
allAxis.unshift({
19241924
dataeaseName: SERIES_NUMBER_FIELD,
19251925
name: this.sizeForm.indexLabel
19261926
})
19271927
}
1928-
if (!allAxis.length) {
1928+
if (!allAxis?.length) {
19291929
this.sizeForm.tableFieldWidth?.splice(0)
19301930
this.fieldColumnWidth.fieldId = ''
19311931
this.fieldColumnWidth.width = ''
@@ -1982,7 +1982,10 @@ export default {
19821982
},
19831983
changeBarSizeCase(modifyName) {
19841984
if (!this.doChange) {
1985-
this.doChange = _.debounce(() => this.debounceChange(modifyName), 200)
1985+
this.doChange = _.debounce(() => {
1986+
this.debounceChange(modifyName)
1987+
this.doChange = undefined
1988+
}, 200)
19861989
}
19871990
this.doChange()
19881991
},

0 commit comments

Comments
 (0)