|
|
|
@ -98,8 +98,8 @@ export default {
|
|
|
|
|
this.setOptionsY();
|
|
|
|
|
this.setOptionsTop();
|
|
|
|
|
this.setOptionsTooltip();
|
|
|
|
|
//this.setOptionsMargin();
|
|
|
|
|
//this.setOptionsLegend();
|
|
|
|
|
this.setOptionsMargin();
|
|
|
|
|
this.setOptionsLegend();
|
|
|
|
|
//this.setOptionsColor();
|
|
|
|
|
this.setOptionsData();
|
|
|
|
|
},
|
|
|
|
@ -121,7 +121,6 @@ export default {
|
|
|
|
|
fontWeight: optionsCollapse.subTextFontWeight,
|
|
|
|
|
fontSize: optionsCollapse.subTextFontSize
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.options.title = title;
|
|
|
|
|
},
|
|
|
|
|
// X轴设置
|
|
|
|
@ -245,15 +244,14 @@ export default {
|
|
|
|
|
const optionsCollapse = this.optionsSetup;
|
|
|
|
|
const legend = this.options.legend;
|
|
|
|
|
legend.show = optionsCollapse.isShowLegend;
|
|
|
|
|
legend.left = optionsCollapse.lateralPosition == "left" ? 0 : "auto";
|
|
|
|
|
legend.right = optionsCollapse.lateralPosition == "right" ? 0 : "auto";
|
|
|
|
|
legend.left = optionsCollapse.lateralPosition;
|
|
|
|
|
legend.top = optionsCollapse.longitudinalPosition == "top" ? 0 : "auto";
|
|
|
|
|
legend.bottom =
|
|
|
|
|
optionsCollapse.longitudinalPosition == "bottom" ? 0 : "auto";
|
|
|
|
|
legend.orient = optionsCollapse.layoutFront;
|
|
|
|
|
legend.textStyle = {
|
|
|
|
|
color: optionsCollapse.lengedColor,
|
|
|
|
|
fontSize: optionsCollapse.fontSize
|
|
|
|
|
fontSize: optionsCollapse.lengedFontSize
|
|
|
|
|
};
|
|
|
|
|
legend.itemWidth = optionsCollapse.lengedWidth;
|
|
|
|
|
},
|
|
|
|
@ -301,6 +299,15 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
return newArr;
|
|
|
|
|
},
|
|
|
|
|
//获取堆叠样式
|
|
|
|
|
getStackStyle() {
|
|
|
|
|
const optionsSetup = this.optionsSetup;
|
|
|
|
|
let style = ""
|
|
|
|
|
if (optionsSetup.stackStyle == "upDown") {
|
|
|
|
|
style = "total"
|
|
|
|
|
}
|
|
|
|
|
return style
|
|
|
|
|
},
|
|
|
|
|
//静态数据
|
|
|
|
|
staticDataFn(val) {
|
|
|
|
|
const optionsSetup = this.optionsSetup;
|
|
|
|
@ -329,6 +336,7 @@ export default {
|
|
|
|
|
type: "bar",
|
|
|
|
|
data: data,
|
|
|
|
|
barGap: "0%",
|
|
|
|
|
stack: this.getStackStyle(),
|
|
|
|
|
barWidth: optionsSetup.maxWidth,
|
|
|
|
|
label: {
|
|
|
|
|
show: optionsSetup.isShow,
|
|
|
|
|