|
|
@ -93,13 +93,14 @@ export default {
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
// 修改图标options属性
|
|
|
|
// 修改图标options属性
|
|
|
|
editorOptions() {
|
|
|
|
editorOptions() {
|
|
|
|
this.setOptionsTitle();
|
|
|
|
//this.setOptionBar();
|
|
|
|
this.setOptionsX();
|
|
|
|
//this.setOptionsTitle();
|
|
|
|
this.setOptionsY();
|
|
|
|
//this.setOptionsX();
|
|
|
|
this.setOptionsTop();
|
|
|
|
//this.setOptionsY();
|
|
|
|
this.setOptionsTooltip();
|
|
|
|
//this.setOptionsTop();
|
|
|
|
this.setOptionsMargin();
|
|
|
|
//this.setOptionsTooltip();
|
|
|
|
this.setOptionsLegend();
|
|
|
|
//this.setOptionsMargin();
|
|
|
|
|
|
|
|
//this.setOptionsLegend();
|
|
|
|
//this.setOptionsColor();
|
|
|
|
//this.setOptionsColor();
|
|
|
|
this.setOptionsData();
|
|
|
|
this.setOptionsData();
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -195,11 +196,25 @@ export default {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.options.yAxis = yAxis;
|
|
|
|
this.options.yAxis = yAxis;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 数值设定 or 柱体设置 数值设定字体大小,默认值没回显
|
|
|
|
//柱体设置
|
|
|
|
|
|
|
|
setOptionBar() {
|
|
|
|
|
|
|
|
const optionsSetup = this.optionsSetup;
|
|
|
|
|
|
|
|
const series = this.options.series;
|
|
|
|
|
|
|
|
const itemStyle = {
|
|
|
|
|
|
|
|
borderRadius: optionsSetup.radius
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const barWidth = optionsSetup.maxWidth;
|
|
|
|
|
|
|
|
for (const key in series) {
|
|
|
|
|
|
|
|
if (series[key].type == "bar") {
|
|
|
|
|
|
|
|
this.options.series[key].itemStyle = itemStyle
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 数值设定 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 +226,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 +342,12 @@ 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,
|
|
|
|
|
|
|
|
itemStyle: {
|
|
|
|
borderRadius: null
|
|
|
|
borderRadius: null
|
|
|
|
}*/
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.options.series = series
|
|
|
|
this.options.series = series
|
|
|
|