From d91b873fb96c99b1a585d2321c71e9becdfd9a5d Mon Sep 17 00:00:00 2001 From: liuqimichale <123456lq> Date: Tue, 12 Mar 2019 14:17:35 +0800 Subject: [PATCH] 收入信息 --- src/components/base/barChart.vue | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 63 insertions(+), 18 deletions(-) diff --git a/src/components/base/barChart.vue b/src/components/base/barChart.vue index b078b6a..9fa503a 100644 --- a/src/components/base/barChart.vue +++ b/src/components/base/barChart.vue @@ -151,25 +151,70 @@ export default { name: '条', type: 'bar', yAxisIndex: 0, - data: [1000,200,300],//百分比 + data: [1000,200,300], + data:[ + { + value:1000, + itemStyle: { + normal: { + color: { + type: 'linear', + x: 0, + x1: 1, + colorStops: [{ + offset: 0, + color: '#2772F4' + }, { + offset: 1, + color: '#00CAFE' + }] + } + }, + } + }, + { + value:200, + itemStyle: { + normal: { + color: { + type: 'linear', + x: 0, + x1: 1, + colorStops: [{ + offset: 0, + color: '#02C202' + }, { + offset: 1, + color: '#51EC51' + }] + } + }, + } + }, + { + value:300, + itemStyle: { + normal: { + color: { + type: 'linear', + x: 0, + x1: 1, + colorStops: [{ + offset: 0, + color: '#FD8811' + }, { + offset: 1, + color: '#FFAB00' + }] + } + }, + } + }, + + + ], barWidth: '40%', - itemStyle: { - normal: { - barBorderRadius: 16, - color: { - type: 'linear', - x: 0, - x1: 1, - colorStops: [{ - offset: 0, - color: '#02ddff' - }, { - offset: 1, - color: '#00feff' - }] - } - }, - }, + label: { normal: {show: false} }, -- libgit2 0.21.4