forked from github/dataease
Merge pull request #12700 from dataease/pr@dev-v2@refactor_group_stack_bar_sum_label
refactor(图表): 分组堆叠柱状图去除总计标签
This commit is contained in:
commit
f541817c2c
@ -436,10 +436,11 @@ export class GroupBar extends StackBar {
|
||||
}
|
||||
|
||||
protected configLabel(chart: Chart, options: ColumnOptions): ColumnOptions {
|
||||
const baseOptions = super.configLabel(chart, options)
|
||||
if (!baseOptions.label) {
|
||||
return baseOptions
|
||||
const tmpLabel = getLabel(chart)
|
||||
if (!tmpLabel) {
|
||||
return options
|
||||
}
|
||||
const baseOptions = { ...options, label: tmpLabel }
|
||||
const { label: labelAttr } = parseJson(chart.customAttr)
|
||||
baseOptions.label.style.fill = labelAttr.color
|
||||
const label = {
|
||||
@ -517,10 +518,11 @@ export class GroupStackBar extends StackBar {
|
||||
}
|
||||
|
||||
protected configLabel(chart: Chart, options: ColumnOptions): ColumnOptions {
|
||||
const baseOptions = super.configLabel(chart, options)
|
||||
if (!baseOptions.label) {
|
||||
return baseOptions
|
||||
const tmpLabel = getLabel(chart)
|
||||
if (!tmpLabel) {
|
||||
return options
|
||||
}
|
||||
const baseOptions = { ...options, label: tmpLabel }
|
||||
const { label: labelAttr } = parseJson(chart.customAttr)
|
||||
baseOptions.label.style.fill = labelAttr.color
|
||||
const label = {
|
||||
|
Loading…
Reference in New Issue
Block a user