Merge pull request #12473 from dataease/pr@dev@chart-stock-line-style-fix

fix(视图): 修复K线图批量调整线条及折点样式无效的问题
This commit is contained in:
jianneng-fit2cloud 2024-09-25 23:34:24 +08:00 committed by GitHub
commit c2f60c029b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 7 deletions

View File

@ -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',

View File

@ -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()
},