|
@@ -35,7 +35,7 @@ let option = {
|
|
|
axisLabel: {
|
|
|
color: "#fff",
|
|
|
rotate: 0,
|
|
|
- interval: 0,//代表显示所有x轴标签显示//设置为 1,表示『隔一个标签显示一个标签』
|
|
|
+ interval: 0, //代表显示所有x轴标签显示//设置为 1,表示『隔一个标签显示一个标签』
|
|
|
},
|
|
|
// 不显示x轴刻度
|
|
|
axisTick: {
|
|
@@ -92,7 +92,7 @@ let seriesItem = {
|
|
|
xAxisPoint: api.coord([api.value(0), 0]),
|
|
|
},
|
|
|
style: {
|
|
|
- fill: colors[params.seriesIndex][0],
|
|
|
+ fill: colors[params.seriesIndex % 3][0],
|
|
|
// new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
|
// {
|
|
|
// offset: 0,
|
|
@@ -116,7 +116,7 @@ let seriesItem = {
|
|
|
xAxisPoint: api.coord([api.value(0), 0]),
|
|
|
},
|
|
|
style: {
|
|
|
- fill: colors[params.seriesIndex][1],
|
|
|
+ fill: colors[params.seriesIndex % 3][1],
|
|
|
// new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
|
// {
|
|
|
// offset: 0,
|
|
@@ -143,11 +143,11 @@ let seriesItem = {
|
|
|
fill: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
|
{
|
|
|
offset: 0,
|
|
|
- color: colors[params.seriesIndex][2],
|
|
|
+ color: colors[params.seriesIndex % 3][2],
|
|
|
},
|
|
|
{
|
|
|
offset: 1,
|
|
|
- color: colors[params.seriesIndex][3],
|
|
|
+ color: colors[params.seriesIndex % 3][3],
|
|
|
},
|
|
|
]),
|
|
|
},
|
|
@@ -244,9 +244,10 @@ export default {
|
|
|
options3d(v) {
|
|
|
option.grid.bottom = v.gridbottom;
|
|
|
option.xAxis.data = v.xData;
|
|
|
+ option.series = [];
|
|
|
v.yData.forEach((item, k) => {
|
|
|
let o = cloneDeep(seriesItem); // JSON.parse(JSON.stringify(seriesItem));
|
|
|
- // o.name = v.legend[k];
|
|
|
+ o.name = v.xData[k];
|
|
|
o.data = item;
|
|
|
// if (v.interval) {
|
|
|
// option.xAxis.axisLabel.interval = 0;
|