|
@@ -99,10 +99,14 @@ export default {
|
|
|
color: ["#1893ce", "#edbf00", "#039178", "#ae4802", "#ea8b00"],
|
|
|
tooltip: {
|
|
|
trigger: "item",
|
|
|
- backgroundColor: "rgba(0,0,0,0.4)",
|
|
|
- borderColor: partten.getColor("gray"),
|
|
|
+ backgroundColor: this.$store.state.themeName === "dark"
|
|
|
+ ? "rgba(0,0,0,0.4)"
|
|
|
+ : "rgba(255,255,255,0.5)",
|
|
|
+ borderColor: this.$store.state.themeName === "dark"
|
|
|
+ ? partten.getColor("gray")
|
|
|
+ : "#000",
|
|
|
textStyle: {
|
|
|
- color: "#fff",
|
|
|
+ color: this.$store.state.themeName === "dark" ? "#fff" : "#000",
|
|
|
fontSize: util.vh(16),
|
|
|
},
|
|
|
},
|
|
@@ -128,15 +132,21 @@ export default {
|
|
|
//icon: 'circle',
|
|
|
itemGap: 12, //图例item间距
|
|
|
textStyle: {
|
|
|
- color: partten.getColor("gray"),
|
|
|
+ color: this.$store.state.themeName === "dark"
|
|
|
+ ? partten.getColor("gray")
|
|
|
+ : "#000",
|
|
|
fontSize: util.vh(14),
|
|
|
rich: {
|
|
|
name: {
|
|
|
- color: partten.getColor("gray"),
|
|
|
+ color: this.$store.state.themeName === "dark"
|
|
|
+ ? partten.getColor("gray")
|
|
|
+ : "#000",
|
|
|
fontSize: 12,
|
|
|
},
|
|
|
value: {
|
|
|
- color: partten.getColor("grayl"),
|
|
|
+ color: this.$store.state.themeName === "dark"
|
|
|
+ ? partten.getColor("grayl")
|
|
|
+ : "#000",
|
|
|
fontSize: 12,
|
|
|
},
|
|
|
},
|
|
@@ -175,14 +185,14 @@ export default {
|
|
|
// length: 40,
|
|
|
// length2: 120,
|
|
|
lineStyle: {
|
|
|
- color: "#fff",
|
|
|
+ color: this.$store.state.themeName === "dark" ? "#fff" : "#000",
|
|
|
fontSize: util.vh(14),
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
itemStyle: {
|
|
|
normal: {
|
|
|
- borderWidth: util.vh(14),
|
|
|
+ borderWidth:this.$store.state.themeName === "dark" ? util.vh(14): util.vh(8),
|
|
|
borderColor: "#071812",
|
|
|
},
|
|
|
},
|
|
@@ -193,10 +203,10 @@ export default {
|
|
|
},
|
|
|
padding: [0, 0, 0, 0],
|
|
|
rich: {
|
|
|
- color: "#ffffff" + "cc",
|
|
|
+ color: this.$store.state.themeName === "dark" ? "#fff" : "#000",
|
|
|
percent: {
|
|
|
fontSize: util.vh(14),
|
|
|
- color: "#ffffff" + "cc",
|
|
|
+ color: this.$store.state.themeName === "dark" ? "#FFFFFF" : "#000000" ,
|
|
|
},
|
|
|
},
|
|
|
},
|
|
@@ -220,6 +230,11 @@ export default {
|
|
|
updated() {
|
|
|
this.initChart();
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ "$store.state.themeName"() {
|
|
|
+ this.initChart();
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|