Commit 1d0db3ee authored by 姬鋆屾's avatar 姬鋆屾

parent 7c1922b8
...@@ -71,6 +71,7 @@ export default { ...@@ -71,6 +71,7 @@ export default {
bottom: "2%", bottom: "2%",
containLabel: true, containLabel: true,
}, },
// color:[ "#61a0a8",],
yAxis: {}, yAxis: {},
series: [ series: [
{ {
...@@ -78,6 +79,22 @@ export default { ...@@ -78,6 +79,22 @@ export default {
type: "bar", type: "bar",
data: [5, 20, 36, 10, 10, 20], data: [5, 20, 36, 10, 10, 20],
itemStyle: { itemStyle: {
normal: {
//这里是重点
color: function(params) {
//注意,如果颜色太少的话,后面颜色不会自动循环,最好多定义几个颜色
var colorList = [
"#c23531",
"#2f4554",
"#61a0a8",
"#d48265",
"#91c7ae",
"#749f83",
"#ca8622",
];
return colorList[params.dataIndex];
},
},
lineStyle: { lineStyle: {
type: "dotted", //'dotted'虚线 'solid'实线 type: "dotted", //'dotted'虚线 'solid'实线
}, },
......
...@@ -56,6 +56,7 @@ export default { ...@@ -56,6 +56,7 @@ export default {
}, },
}, },
tooltip: {}, tooltip: {},
color:[ "#61a0a8",],
xAxis: { xAxis: {
type: "category", type: "category",
data: ["部门1", "部门2", "部门3", "部门4", "部门5", "部门6"], data: ["部门1", "部门2", "部门3", "部门4", "部门5", "部门6"],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment