This commit is contained in:
zhangyu
2021-07-06 15:58:52 +08:00
2 changed files with 32 additions and 2 deletions

View File

@@ -5,7 +5,10 @@
*/
import { format } from 'echarts'
import _ from 'lodash'
export const chartColor = ['#73A0FA', '#73DEB3', '#F7C739', '#EB7E65', '#FFAB67', '#A285D2', '#FFA8CB']
export function getChartColor (index) {
return chartColor[index % chartColor.length]
}
const line = {
tooltip: {
appendToBody: true,
@@ -30,6 +33,7 @@ const line = {
bottom: 45,
top: 30
},
color: chartColor,
legend: {
show: true,
right: 30,
@@ -76,6 +80,7 @@ const lineWithStatistics = {
yAxis: {
type: 'value'
},
color: chartColor,
grid: {
left: 55,
bottom: 45,
@@ -112,6 +117,7 @@ const lineStack = {
xAxis: {
type: 'time'
},
color: chartColor,
yAxis: {
type: 'value'
},
@@ -154,6 +160,7 @@ const pieWithTable = {
appendToBody: true,
trigger: 'item'
},
color: chartColor,
animation: false,
legend: {
orient: 'vertical',