From b0c64357986001b4c7a1354af07f6e6eb0ddffc7 Mon Sep 17 00:00:00 2001 From: jianneng-fit2cloud Date: Wed, 24 Jul 2024 10:58:30 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8-=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E6=8A=98=E7=BA=BF=E5=9B=BE):=20=E4=BF=AE=E5=A4=8D=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=AD=90=E7=B1=BB=E5=88=AB=E7=BB=B4=E5=BA=A6=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/chart/components/js/util.ts | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/js/util.ts b/core/core-frontend/src/views/chart/components/js/util.ts index 50933ff6c0..a1a7858b4c 100644 --- a/core/core-frontend/src/views/chart/components/js/util.ts +++ b/core/core-frontend/src/views/chart/components/js/util.ts @@ -655,14 +655,14 @@ export const stepsColor = (start, end, steps, gamma) => { function parseColor(hexStr) { return hexStr.length === 4 ? hexStr - .substr(1) - .split('') - .map(function (s) { - return 0x11 * parseInt(s, 16) - }) - : [hexStr.substr(1, 2), hexStr.substr(3, 2), hexStr.substr(5, 2)].map(function (s) { - return parseInt(s, 16) + .substr(1) + .split('') + .map(function (s) { + return 0x11 * parseInt(s, 16) }) + : [hexStr.substr(1, 2), hexStr.substr(3, 2), hexStr.substr(5, 2)].map(function (s) { + return parseInt(s, 16) + }) } function pad(s) { return s.length === 1 ? '0' + s : s @@ -958,8 +958,8 @@ export const registerExtremumPointEvt = (newChart, chart, options, container) => // 针对不是序列字段的图表,通过获取分类字段的值作为序列字段,在标签配置时使用 const seriesFieldObjs = [] // 分组柱状图这种字段分类的图表,需要按照分类字段的值作为序列字段 - if (['bar-group'].includes(chart.type)) { - const xAxisExt = chart.xAxisExt || [] + const xAxisExt = chart.xAxisExt || [] + if (['bar-group'].includes(chart.type) || xAxisExt.length > 0) { seriesFields = [...new Set(options.data.map(item => item.category))] if (xAxisExt.length === 0) { seriesFields = ['@'] @@ -971,7 +971,7 @@ export const registerExtremumPointEvt = (newChart, chart, options, container) => ? 'f_' + chart.xAxis[0].dataeaseName + '_' + field : chart.xAxisExt[0]?.dataeaseName + '_' + field, name: field, - showExtremum: labelAttr.showExtremum, + showExtremum: true, formatterCfg: labelAttr.labelFormatter }) })