bugfix--柱状图竖展示异常

qianming 1 year ago
parent 9d4351ef27
commit b8e12d38b0

@ -151,6 +151,17 @@ export default {
},
//
inverse: optionsSetup.reversalX,
axisLabel : {
show: true,
interval: optionsSetup.textInterval,
//
rotate: optionsSetup.textAngleX,
textStyle: {
//
color: optionsSetup.colorX,
fontSize: optionsSetup.fontSizeX,
},
},
axisLine: {
show: true,
lineStyle: {
@ -335,18 +346,6 @@ export default {
}
const legendName = [];
legendName.push("bar");
// x
if (optionsSetup.verticalShow) {
this.options.xAxis.data = [];
this.options.yAxis.data = axis;
this.options.xAxis.type = "value";
this.options.yAxis.type = "category";
} else {
this.options.xAxis.data = axis;
this.options.yAxis.data = [];
this.options.xAxis.type = "category";
this.options.yAxis.type = "value";
}
for (const i in series) {
if (series[i].type == "bar") {
series[i].type = "bar";
@ -416,8 +415,20 @@ export default {
}
return str
}
};
// x
if (optionsSetup.verticalShow) {
this.options.xAxis.data = [];
this.options.yAxis.data = axis;
this.options.xAxis.type = "value";
this.options.yAxis.type = "category";
} else {
this.options.xAxis.data = axis;
this.options.yAxis.data = [];
this.options.xAxis.type = "category";
this.options.yAxis.type = "value";
this.options.xAxis.axisLabel = axisLabel;
}
this.options.xAxis.axisLabel = axisLabel;
this.options.legend["data"] = legendName;
this.setOptionsLegendName(legendName);
},
@ -451,18 +462,6 @@ export default {
}
const series = [];
const legendName = [];
// x
if (optionsSetup.verticalShow) {
this.options.xAxis.data = [];
this.options.yAxis.data = val.xAxis;
this.options.xAxis.type = "value";
this.options.yAxis.type = "category";
} else {
this.options.xAxis.data = val.xAxis;
this.options.yAxis.data = [];
this.options.xAxis.type = "category";
this.options.yAxis.type = "value";
}
for (const i in val.series) {
legendName.push(val.series[i].name);
const obj = {};
@ -537,8 +536,20 @@ export default {
}
return str
}
};
// x
if (optionsSetup.verticalShow) {
this.options.xAxis.data = [];
this.options.yAxis.data = val.xAxis;
this.options.xAxis.type = "value";
this.options.yAxis.type = "category";
} else {
this.options.xAxis.data = val.xAxis;
this.options.yAxis.data = [];
this.options.xAxis.type = "category";
this.options.yAxis.type = "value";
this.options.xAxis.axisLabel = axisLabel;
}
this.options.xAxis.axisLabel = axisLabel;
this.options.series = series;
this.options.legend["data"] = legendName;
this.setOptionsLegendName(legendName);

Loading…
Cancel
Save