|
|
@ -98,12 +98,12 @@ export default {
|
|
|
|
this.setOptionsY();
|
|
|
|
this.setOptionsY();
|
|
|
|
this.setOptionsTop();
|
|
|
|
this.setOptionsTop();
|
|
|
|
this.setOptionsTooltip();
|
|
|
|
this.setOptionsTooltip();
|
|
|
|
this.setOptionsMargin();
|
|
|
|
//this.setOptionsMargin();
|
|
|
|
this.setOptionsLegend();
|
|
|
|
//this.setOptionsLegend();
|
|
|
|
//this.setOptionsColor();
|
|
|
|
//this.setOptionsColor();
|
|
|
|
this.setOptionsData();
|
|
|
|
this.setOptionsData();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 标题修改 对应数据内容例如ABC等的调整
|
|
|
|
// 标题修改
|
|
|
|
setOptionsTitle() {
|
|
|
|
setOptionsTitle() {
|
|
|
|
const optionsCollapse = this.optionsSetup;
|
|
|
|
const optionsCollapse = this.optionsSetup;
|
|
|
|
const title = {};
|
|
|
|
const title = {};
|
|
|
@ -135,7 +135,7 @@ export default {
|
|
|
|
color: optionsCollapse.xNameColor,
|
|
|
|
color: optionsCollapse.xNameColor,
|
|
|
|
fontSize: optionsCollapse.xNameFontSize
|
|
|
|
fontSize: optionsCollapse.xNameFontSize
|
|
|
|
},
|
|
|
|
},
|
|
|
|
nameRotate: optionsCollapse.textAngle, // 文字角度
|
|
|
|
nameRotate: optionsCollapse.textAngleX, // 文字角度
|
|
|
|
inverse: optionsCollapse.reversalX, // 轴反转
|
|
|
|
inverse: optionsCollapse.reversalX, // 轴反转
|
|
|
|
axisLabel: {
|
|
|
|
axisLabel: {
|
|
|
|
show: true,
|
|
|
|
show: true,
|
|
|
@ -175,6 +175,7 @@ export default {
|
|
|
|
inverse: optionsCollapse.reversalY, // y轴反转
|
|
|
|
inverse: optionsCollapse.reversalY, // y轴反转
|
|
|
|
axisLabel: {
|
|
|
|
axisLabel: {
|
|
|
|
show: true,
|
|
|
|
show: true,
|
|
|
|
|
|
|
|
rotate: optionsCollapse.textAngleY,// 文字角度
|
|
|
|
textStyle: {
|
|
|
|
textStyle: {
|
|
|
|
color: optionsCollapse.colorY, // y轴 坐标文字颜色
|
|
|
|
color: optionsCollapse.colorY, // y轴 坐标文字颜色
|
|
|
|
fontSize: optionsCollapse.fontSizeY
|
|
|
|
fontSize: optionsCollapse.fontSizeY
|
|
|
@ -195,11 +196,10 @@ export default {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.options.yAxis = yAxis;
|
|
|
|
this.options.yAxis = yAxis;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 数值设定 or 柱体设置 数值设定字体大小,默认值没回显
|
|
|
|
// 数值设定 or 柱体设置
|
|
|
|
setOptionsTop() {
|
|
|
|
setOptionsTop() {
|
|
|
|
const optionsCollapse = this.optionsSetup;
|
|
|
|
const optionsCollapse = this.optionsSetup;
|
|
|
|
const series = this.options.series;
|
|
|
|
const series = this.options.series;
|
|
|
|
|
|
|
|
|
|
|
|
for (const key in series) {
|
|
|
|
for (const key in series) {
|
|
|
|
if (series[key].type == "bar") {
|
|
|
|
if (series[key].type == "bar") {
|
|
|
|
series[key].label = {
|
|
|
|
series[key].label = {
|
|
|
@ -211,25 +211,23 @@ export default {
|
|
|
|
fontWeight: optionsCollapse.fontWeight
|
|
|
|
fontWeight: optionsCollapse.fontWeight
|
|
|
|
};
|
|
|
|
};
|
|
|
|
series[key].barWidth = optionsCollapse.maxWidth;
|
|
|
|
series[key].barWidth = optionsCollapse.maxWidth;
|
|
|
|
console.log(series[key].barWidth)
|
|
|
|
|
|
|
|
series[key].barMinHeight = optionsCollapse.minHeight;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.options.series = series;
|
|
|
|
this.options.series = series;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// tooltip 设置
|
|
|
|
// tooltip 提示语设置,鼠标放置显示
|
|
|
|
setOptionsTooltip() {
|
|
|
|
setOptionsTooltip() {
|
|
|
|
const optionsCollapse = this.optionsSetup;
|
|
|
|
const optionsCollapse = this.optionsSetup;
|
|
|
|
const tooltip = {
|
|
|
|
const tooltip = {
|
|
|
|
trigger: "item",
|
|
|
|
trigger: "item",
|
|
|
|
show: true,
|
|
|
|
show: true,
|
|
|
|
textStyle: {
|
|
|
|
textStyle: {
|
|
|
|
color: optionsCollapse.lineColor,
|
|
|
|
color: optionsCollapse.lineColor,
|
|
|
|
fontSize: optionsCollapse.fontSize
|
|
|
|
fontSize: optionsCollapse.tipsFontSize
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.options.tooltip = tooltip;
|
|
|
|
this.options.tooltip = tooltip;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 边距设置
|
|
|
|
// 边距设置
|
|
|
|
setOptionsMargin() {
|
|
|
|
setOptionsMargin() {
|
|
|
|
const optionsCollapse = this.optionsSetup;
|
|
|
|
const optionsCollapse = this.optionsSetup;
|
|
|
@ -329,11 +327,20 @@ export default {
|
|
|
|
series.push({
|
|
|
|
series.push({
|
|
|
|
name: yAxisList[i],
|
|
|
|
name: yAxisList[i],
|
|
|
|
type: "bar",
|
|
|
|
type: "bar",
|
|
|
|
data: data ,
|
|
|
|
data: data,
|
|
|
|
barGap: "0%",
|
|
|
|
barGap: "0%",
|
|
|
|
/*itemStyle: {
|
|
|
|
barWidth : optionsSetup.maxWidth,
|
|
|
|
|
|
|
|
label : {
|
|
|
|
|
|
|
|
show: optionsSetup.isShow,
|
|
|
|
|
|
|
|
position: "top",
|
|
|
|
|
|
|
|
distance: 10,
|
|
|
|
|
|
|
|
fontSize: optionsSetup.fontSize,
|
|
|
|
|
|
|
|
color: optionsSetup.subTextColor,
|
|
|
|
|
|
|
|
fontWeight: optionsSetup.fontWeight
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
itemStyle: {
|
|
|
|
borderRadius: null
|
|
|
|
borderRadius: null
|
|
|
|
}*/
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.options.series = series
|
|
|
|
this.options.series = series
|
|
|
|