fix(图表): 修复分组柱状图未勾选显示标签,但却显示了标签的问题

This commit is contained in:
jianneng-fit2cloud
2025-09-18 19:19:38 +08:00
parent dac9cdf9d1
commit 8b60ff8b0e
7 changed files with 7 additions and 7 deletions

View File

@@ -59,7 +59,7 @@ export class GroupBar extends StackBar {
protected configLabel(chart: Chart, options: ViewSpec): ViewSpec {
const customAttr = parseJson(chart.customAttr)
const { label: labelAttr } = customAttr
if (!labelAttr || !labelAttr.show) return options
if (!labelAttr.show || !labelAttr.childrenShow) return options
const { children } = options
if (labelAttr.showExtremum) {

View File

@@ -29,7 +29,7 @@ export class GroupStackBar extends StackBar {
protected configLabel(chart: Chart, options: ViewSpec): ViewSpec {
const customAttr = parseJson(chart.customAttr)
const { label: labelAttr } = customAttr
if (!labelAttr || !labelAttr.show) return options
if (!labelAttr.show) return options
const { children } = options
const position = {

View File

@@ -25,7 +25,7 @@ export class PercentageStackBar extends GroupStackBar {
protected configLabel(chart: Chart, options: ViewSpec): ViewSpec {
const customAttr = parseJson(chart.customAttr)
const { label: labelAttr } = customAttr
if (!labelAttr || !labelAttr.show) return options
if (!labelAttr.show) return options
const { children } = options
const position = {

View File

@@ -25,7 +25,7 @@ export class PercentageStackBar extends HorizontalStackBar {
protected configLabel(chart: Chart, options: ViewSpec): ViewSpec {
const customAttr = parseJson(chart.customAttr)
const { label: labelAttr } = customAttr
if (!labelAttr || !labelAttr.show) return options
if (!labelAttr.show) return options
const { children } = options
const position = {

View File

@@ -141,7 +141,7 @@ export class RangeBar extends HorizontalBar {
protected configLabel(chart: Chart, options: ViewSpec): ViewSpec {
const customAttr = parseJson(chart.customAttr)
const { label: labelAttr } = customAttr
if (!labelAttr || !labelAttr.show) return options
if (!labelAttr.show) return options
const { children } = options
const position = {

View File

@@ -46,7 +46,7 @@ export class StackBar extends Bar {
protected configLabel(chart: Chart, options: ViewSpec): ViewSpec {
const customAttr = parseJson(chart.customAttr)
const { label: labelAttr } = customAttr
if (!labelAttr || !labelAttr.show) return options
if (!labelAttr.show) return options
const { children } = options
const position = {

View File

@@ -216,7 +216,7 @@ export class Waterfall extends Bar {
protected configLabel(chart: Chart, options: ViewSpec): ViewSpec {
const customAttr = parseJson(chart.customAttr)
const { label: labelAttr } = customAttr
if (!labelAttr || !labelAttr.show) return options
if (!labelAttr.show) return options
const { children } = options
const position = {