diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/line/area.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/line/area.ts index 18c155090c..20932bf19b 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/line/area.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/line/area.ts @@ -317,7 +317,6 @@ export class StackArea extends Area { } protected configLabel(chart: Chart, options: AreaOptions): AreaOptions { const { label: labelAttr, basicStyle } = parseJson(chart.customAttr) - const conditions = getLineConditions(chart) if (!labelAttr?.show) { return { ...options, @@ -341,10 +340,7 @@ export class StackArea extends Area { fill: labelAttr.color, fontSize: labelAttr.fontSize }, - formatter: function (param: Datum, point) { - point.color = - getLineLabelColorByCondition(conditions, param.value, point._origin.quotaList[0]) || - labelAttr.color + formatter: function (param: Datum) { return valueFormatter(param.value, labelAttr.labelFormatter) } } @@ -392,6 +388,8 @@ export class StackArea extends Area { ...this.baseOptions, isStack: true } + delete this.propertyInner.threshold + this.properties = this.properties.filter(item => item !== 'threshold') this.axis.push('extStack') } } diff --git a/core/core-frontend/src/views/chart/components/js/panel/common/common_antv.ts b/core/core-frontend/src/views/chart/components/js/panel/common/common_antv.ts index d6842b58be..6212518c4e 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/common/common_antv.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/common/common_antv.ts @@ -1346,7 +1346,7 @@ export const TOOLTIP_TPL = export function getConditions(chart: Chart) { const { threshold } = parseJson(chart.senior) const annotations = [] - if (!threshold.enable) return annotations + if (!threshold.enable || chart.type === 'area-stack') return annotations const conditions = threshold.lineThreshold ?? [] const yAxisIds = chart.yAxis.map(i => i.id) for (const field of conditions) {