From 7b18c4c77e05e3a748320cbcf8aa1b00b1961c9b Mon Sep 17 00:00:00 2001 From: junjun Date: Thu, 7 Apr 2022 13:54:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E4=BB=AA=E8=A1=A8?= =?UTF-8?q?=E7=9B=98=E5=88=BB=E5=BA=A6=E6=A0=B7=E5=BC=8F=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/chart/chart/gauge/gauge.js | 13 +++++++++--- .../src/views/chart/chart/gauge/gauge_antv.js | 20 +++++++++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/chart/chart/gauge/gauge.js b/frontend/src/views/chart/chart/gauge/gauge.js index 71c6a1814c..c578949fa9 100644 --- a/frontend/src/views/chart/chart/gauge/gauge.js +++ b/frontend/src/views/chart/chart/gauge/gauge.js @@ -87,17 +87,24 @@ export function baseGaugeOption(chart_option, chart) { show: false } chart_option.series[0].axisTick = { + splitNumber: 5, // TODO 刻度间隔数 + length: 10, // TODO 子刻度线长度 lineStyle: { - color: 'auto' + color: 'auto', + width: 2// TODO 子刻度线宽度 } } chart_option.series[0].splitLine = { + length: 18, // TODO 刻度线长度 lineStyle: { - color: 'auto' + color: 'auto', + width: 2// TODO 刻度线宽度 } } chart_option.series[0].axisLabel = { - color: 'auto' + color: 'auto', + distance: 20, // TODO 刻度值文字里刻度线距离 + fontSize: 20// TODO 刻度值字体大小 } } } diff --git a/frontend/src/views/chart/chart/gauge/gauge_antv.js b/frontend/src/views/chart/chart/gauge/gauge_antv.js index 82cd5071d7..2aff090ed8 100644 --- a/frontend/src/views/chart/chart/gauge/gauge_antv.js +++ b/frontend/src/views/chart/chart/gauge/gauge_antv.js @@ -72,6 +72,26 @@ export function baseGaugeOptionAntV(plot, container, chart, action) { // indicator: null, statistic: { content: labelContent + }, + axis: { + label: { + style: { + fontSize: 14// TODO 刻度值字体大小 + } + }, + tickLine: { + length: -12, // TODO 刻度线长度 + style: { + lineWidth: 1// TODO 刻度线宽度 + } + }, + subTickLine: { + count: 4, // TODO 子刻度数 + length: -6, // TODO 子刻度线长度 + style: { + lineWidth: 1// TODO 子刻度线宽度 + } + } } // range: { // width: 12