diff --git a/common/changes/@visactor/vchart/fix-heatmap-label_2025-12-26-08-38.json b/common/changes/@visactor/vchart/fix-heatmap-label_2025-12-26-08-38.json new file mode 100644 index 0000000000..13ba46254f --- /dev/null +++ b/common/changes/@visactor/vchart/fix-heatmap-label_2025-12-26-08-38.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "fix: fix default lineWidth for heatmap label\n\n", + "type": "none", + "packageName": "@visactor/vchart" + } + ], + "packageName": "@visactor/vchart", + "email": "dingling112@gmail.com" +} \ No newline at end of file diff --git a/packages/vchart/src/series/heatmap/heatmap.ts b/packages/vchart/src/series/heatmap/heatmap.ts index 3ad2f3d783..7467526fb9 100644 --- a/packages/vchart/src/series/heatmap/heatmap.ts +++ b/packages/vchart/src/series/heatmap/heatmap.ts @@ -73,7 +73,7 @@ export class HeatmapSeries ex return; } this.setMarkStyle(textMark, { - fill: this.getColorAttribute(), + fill: this._spec.cell?.style?.fill ?? this.getColorAttribute(), text: (datum: Datum) => { return datum[this.getMeasureField()[0]]; } diff --git a/packages/vchart/src/theme/builtin/common/series/heatmap.ts b/packages/vchart/src/theme/builtin/common/series/heatmap.ts index 6697536abf..460e324640 100644 --- a/packages/vchart/src/theme/builtin/common/series/heatmap.ts +++ b/packages/vchart/src/theme/builtin/common/series/heatmap.ts @@ -9,5 +9,10 @@ export const heatmap: IHeatmapSeriesTheme = { }, cellBackground: { visible: false + }, + label: { + style: { + lineWidth: 2 + } } };