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 }] }] };