|
@@ -39,6 +39,7 @@ export default {
|
|
|
default: true,
|
|
|
},
|
|
|
title: { type: String, default: "" },
|
|
|
+ type: { type: Number, default: 0 },
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -53,7 +54,8 @@ export default {
|
|
|
// let legend1 = this.innerData.map((v) => v.name);
|
|
|
// let legend2 = this.outerData.map((v) => v.name);
|
|
|
// let legendData = [...legend1, ...legend2];
|
|
|
-
|
|
|
+ let type = this.type;
|
|
|
+
|
|
|
let option = {
|
|
|
title: {
|
|
|
text: this.title,
|
|
@@ -67,7 +69,13 @@ export default {
|
|
|
tooltip: {
|
|
|
trigger: "item",
|
|
|
formatter: function (params) {
|
|
|
- return params.marker + params.name + " " + params.value + "%";
|
|
|
+ return (
|
|
|
+ params.marker +
|
|
|
+ params.name +
|
|
|
+ " " +
|
|
|
+ params.value +
|
|
|
+ (type == 1 ? "次" : "%")
|
|
|
+ );
|
|
|
},
|
|
|
},
|
|
|
legend: {
|