From ee2591a51fe60d07b72cae60a872938f053b5b1d Mon Sep 17 00:00:00 2001 From: jianneng-fit2cloud Date: Thu, 11 Dec 2025 16:55:50 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=9B=BE=E8=A1=A8):=20=E7=83=AD=E5=8A=9B?= =?UTF-8?q?=E5=9B=BE=E6=8C=87=E6=A0=87=E6=94=AF=E6=8C=81=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=20#17529?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/components/js/panel/charts/table/t-heatmap.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/table/t-heatmap.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/table/t-heatmap.ts index 8afb116539..67109910f8 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/table/t-heatmap.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/table/t-heatmap.ts @@ -37,7 +37,7 @@ export class TableHeatmap extends G2PlotChartView { propertyInner: EditorPropertyInner = { 'background-overall-component': ['all'], 'basic-style-selector': ['colors'], - 'label-selector': ['fontSize', 'color'], + 'label-selector': ['fontSize', 'color', 'labelFormatter'], 'x-axis-selector': ['name', 'color', 'fontSize', 'position', 'axisLabel', 'axisLine'], 'y-axis-selector': [ 'name', @@ -61,7 +61,7 @@ export class TableHeatmap extends G2PlotChartView { 'fontShadow' ], 'legend-selector': ['orient', 'color', 'fontSize', 'hPosition', 'vPosition'], - 'tooltip-selector': ['show', 'color', 'fontSize', 'backgroundColor'], + 'tooltip-selector': ['show', 'color', 'fontSize', 'backgroundColor', 'tooltipFormatter'], 'border-style': ['all'] } axis: AxisType[] = ['xAxis', 'xAxisExt', 'extColor', 'filter'] @@ -244,7 +244,7 @@ export class TableHeatmap extends G2PlotChartView { const name = fieldObj?.chartShowName ? fieldObj?.chartShowName : fieldObj?.name let value = originalItems[0].data[fieldObj.dataeaseName] if (!isNaN(Number(value))) { - value = valueFormatter(value, fieldObj?.formatterCfg) + value = valueFormatter(value, customAttr.tooltip.tooltipFormatter) } items.push({ ...originalItems[0], @@ -327,6 +327,7 @@ export class TableHeatmap extends G2PlotChartView { const tmpOptions = super.configLabel(chart, options) if (tmpOptions.label) { const extColor = deepCopy(chart.extColor) + const { label: labelAttr } = parseJson(chart.customAttr) const layout = [] if (!tmpOptions.label.fullDisplay) { layout.push(...tmpOptions.label.layout) @@ -338,7 +339,7 @@ export class TableHeatmap extends G2PlotChartView { formatter: data => { const value = data[extColor[0]?.dataeaseName] if (!isNaN(Number(value))) { - return valueFormatter(value, extColor[0]?.formatterCfg) + return valueFormatter(value, labelAttr.labelFormatter) } return value }