Merge pull request #13820 from dataease/pr@dev-v2@fix_bar_legend_custom_color

fix(图表): 修复堆叠状图和条形图指标排序导致图例自定义颜色错误 #13341
This commit is contained in:
wisonic-s 2024-12-04 15:05:11 +08:00 committed by GitHub
commit 410316a628
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 20 additions and 8 deletions

View File

@ -249,7 +249,7 @@ onMounted(() => {
maxlength="20"
v-model="state.tableTotalForm.row.label"
clearable
@blur="changeTableTotal('row.label')"
@change="changeTableTotal('row.label')"
/>
</el-form-item>
<el-form-item
@ -389,7 +389,7 @@ onMounted(() => {
size="small"
maxlength="20"
clearable
@blur="changeTableTotal"
@change="changeTableTotal('row.subLabel')"
/>
</el-form-item>
<el-form-item
@ -498,7 +498,7 @@ onMounted(() => {
maxlength="20"
v-model="state.tableTotalForm.col.label"
clearable
@blur="changeTableTotal('col')"
@blur="changeTableTotal('col.label')"
/>
</el-form-item>
<el-form-item
@ -637,7 +637,7 @@ onMounted(() => {
size="small"
maxlength="20"
clearable
@change="changeTableTotal('col')"
@change="changeTableTotal('col.subLabel')"
/>
</el-form-item>
<el-form-item

View File

@ -363,6 +363,7 @@ export class StackBar extends Bar {
return flow(
this.configTheme,
this.configEmptyDataStrategy,
this.configData,
this.configColor,
this.configBasicStyle,
this.configLabel,
@ -371,8 +372,7 @@ export class StackBar extends Bar {
this.configXAxis,
this.configYAxis,
this.configSlider,
this.configAnalyse,
this.configData
this.configAnalyse
)(chart, options, {}, this)
}

View File

@ -368,8 +368,20 @@ export class HorizontalStackBar extends HorizontalBar {
}
protected setupOptions(chart: Chart, options: BarOptions): BarOptions {
const tmp = super.setupOptions(chart, options)
return flow(this.configData)(chart, tmp, {}, this)
return flow(
this.configTheme,
this.configEmptyDataStrategy,
this.configData,
this.configColor,
this.configBasicStyle,
this.configLabel,
this.configTooltip,
this.configLegend,
this.configXAxis,
this.configYAxis,
this.configSlider,
this.configAnalyseHorizontal
)(chart, options, {}, this)
}
constructor(name = 'bar-stack-horizontal') {