|
@@ -101,14 +101,14 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- setOptions(data) {
|
|
|
+ setOptions(data, boxHeight) {
|
|
|
if (!this.myChart) {
|
|
|
// var dom = document.getElementById("pie_echart");
|
|
|
this.myChart = echarts.init(this.$refs.echart);
|
|
|
}
|
|
|
- this.initEchartXzqh(data);
|
|
|
+ this.initEchartXzqh(data, boxHeight);
|
|
|
},
|
|
|
- initEchartXzqh(optionsData) {
|
|
|
+ initEchartXzqh(optionsData, boxHeight) {
|
|
|
let _this = this;
|
|
|
option.legend.formatter = function (name) {
|
|
|
const sItem = optionsData.find((item) =>
|
|
@@ -123,7 +123,7 @@ export default {
|
|
|
return name;
|
|
|
}
|
|
|
};
|
|
|
- option.legend.grid3D.boxHeight = data.boxHeight || 1;
|
|
|
+ option.grid3D.boxHeight = boxHeight || 1;
|
|
|
const series = this.getPie3D(optionsData, 0.6);
|
|
|
option.series = series;
|
|
|
|