|
@@ -504,6 +504,14 @@ export default {
|
|
|
return newArr;
|
|
|
}, []);
|
|
|
seriesList = seriesList.map((item,index ) => {
|
|
|
+ let itemColor = null;
|
|
|
+ if(item.name=='杉木'||item.name=='杉'){
|
|
|
+ itemColor = colorArr[0]
|
|
|
+ }else if(item.name=='马尾松'||item.name=='马'){
|
|
|
+ itemColor = colorArr[1]
|
|
|
+ }else if(item.name=='软阔'||item.name=='软'){
|
|
|
+ itemColor = colorArr[2]
|
|
|
+ }
|
|
|
return {
|
|
|
name: item.name,
|
|
|
type: 'bar',
|
|
@@ -516,7 +524,7 @@ export default {
|
|
|
},
|
|
|
data: [],
|
|
|
itemStyle: {
|
|
|
- normal: { color: colorArr[index]||"auto" },
|
|
|
+ normal: { color: itemColor||colorArr[index]||"auto" },
|
|
|
}
|
|
|
};
|
|
|
});
|
|
@@ -583,6 +591,14 @@ export default {
|
|
|
return newArr;
|
|
|
}, []);
|
|
|
seriesList = seriesList.map((item,index) => {
|
|
|
+ let itemColor = null;
|
|
|
+ if(item.name=='杉木'||item.name=='杉'){
|
|
|
+ itemColor = colorArr[0]
|
|
|
+ }else if(item.name=='马尾松'||item.name=='马'){
|
|
|
+ itemColor = colorArr[1]
|
|
|
+ }else if(item.name=='软阔'||item.name=='软'){
|
|
|
+ itemColor = colorArr[2]
|
|
|
+ }
|
|
|
return {
|
|
|
name: item.name,
|
|
|
type: 'bar',
|
|
@@ -595,7 +611,7 @@ export default {
|
|
|
},
|
|
|
data: [],
|
|
|
itemStyle: {
|
|
|
- normal: { color: colorArr[index]||"auto" },
|
|
|
+ normal: { color: itemColor||colorArr[index]||"auto" },
|
|
|
}
|
|
|
};
|
|
|
});
|