多柱线图

qianming 3 years ago
parent a263bce35f
commit 179a7b5c6e

@ -212,7 +212,6 @@ export default {
this.setOptionsX(); this.setOptionsX();
this.setOptionsY(); this.setOptionsY();
this.setOptionsLegend(); this.setOptionsLegend();
this.setOptionsLegendName();
this.setOptionsTooltip(); this.setOptionsTooltip();
this.setOptionsMargin(); this.setOptionsMargin();
this.setOptionsColor(); this.setOptionsColor();
@ -374,17 +373,12 @@ export default {
}; };
legend.itemWidth = optionsSetup.lengedWidth; legend.itemWidth = optionsSetup.lengedWidth;
}, },
setOptionsLegendName(){ setOptionsLegendName(name){
const optionsSetup = this.optionsSetup; const optionsSetup = this.optionsSetup;
const series = this.options.series; const series = this.options.series;
if (this.optionsData.dataType == 'staticData') {
const legendName = optionsSetup.legendName; const legendName = optionsSetup.legendName;
//
if (null == legendName || legendName == '') { if (null == legendName || legendName == '') {
const name = [];
name.push('调解成功');
name.push('调解失败');
name.push('调解终止');
name.push('调解成功率');
for (let i = 0; i < name.length; i++) { for (let i = 0; i < name.length; i++) {
series[i].name = name[i]; series[i].name = name[i];
} }
@ -396,7 +390,6 @@ export default {
} }
this.options.legend['data'] = arr this.options.legend['data'] = arr
} }
}
}, },
// //
setOptionsColor() { setOptionsColor() {
@ -484,6 +477,13 @@ export default {
series[1].data = bar2; series[1].data = bar2;
series[2].data = bar3; series[2].data = bar3;
series[3].data = line; series[3].data = line;
const legendName = [];
legendName.push('调解成功');
legendName.push('调解失败');
legendName.push('调解终止');
legendName.push('调解成功率');
this.options.legend['data'] = legendName;
this.setOptionsLegendName(legendName);
}, },
dynamicDataFn(val, refreshTime) { dynamicDataFn(val, refreshTime) {
if (!val) return; if (!val) return;
@ -562,7 +562,8 @@ export default {
} }
this.options.legend['data'] = legendName; this.options.legend['data'] = legendName;
this.options.series = series; this.options.series = series;
} this.setOptionsLegendName(legendName);
},
} }
}; };

Loading…
Cancel
Save