From 26d7feacec2d0808bfbd47417efe4c0b8118c7ff Mon Sep 17 00:00:00 2001 From: xiaolian Date: Thu, 31 Oct 2024 15:42:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/score/index.js | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/pages/score/index.js b/pages/score/index.js index 9516adc..dcfc288 100644 --- a/pages/score/index.js +++ b/pages/score/index.js @@ -64,6 +64,36 @@ Page({ showLineChart: false,//是否显示Line图表 ecLine: { onInit: lineChart + }, + chartOrangeStyle: { + // 255 137 91 + areaStyle: { + normal: { + color: 'rgba(255,137,91,0.2)' // 半透明蓝色 + } + }, + lineStyle: { + color: 'rgba(255,137,91,0.8)', // 这里设置线的颜色为红色 + width: 2 // 线的宽度 + }, + itemStyle: { + color: 'rgba(255,137,91,1)' + } + }, + chartGreenStyle: { + // 255 137 91 + areaStyle: { + normal: { + color: 'rgba(49,203,173,0.2)' // 半透明蓝色 + } + }, + lineStyle: { + color: 'rgba(49,203,173,0.8)', // 这里设置线的颜色为红色 + width: 2 // 线的宽度 + }, + itemStyle: { + color: 'rgba(49,203,173,1)' + } } }, @@ -175,15 +205,7 @@ Page({ data: [{ value: [430, 340, 500, 300, 490], name: '预算', - areaStyle: { - normal: { - color: 'rgba(0,136,212,0.2)' // 半透明蓝色 - } - }, - lineStyle: { - color: 'rgba(0,136,212,0.8)', // 这里设置线的颜色为红色 - width: 2 // 线的宽度 - } + ...this.data.chartOrangeStyle //...this.data.chartGreenStyle }] }] };