|
@@ -123,18 +123,26 @@ export default {
|
|
|
icon: "ract",
|
|
|
itemWidth: 8,
|
|
|
itemHeight: 8,
|
|
|
- inactiveColor: partten.getColor("gray"),
|
|
|
+ inactiveColor: this.$store.state.themeName === "dark"
|
|
|
+ ? partten.getColor("gray")
|
|
|
+ : "#000",
|
|
|
textStyle: {
|
|
|
- color: partten.getColor("grayl"),
|
|
|
+ color: this.$store.state.themeName === "dark"
|
|
|
+ ? partten.getColor("grayl")
|
|
|
+ : "#000",
|
|
|
fontSize: 12,
|
|
|
},
|
|
|
},
|
|
|
tooltip: {
|
|
|
trigger: "axis",
|
|
|
- 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),
|
|
|
},
|
|
|
},
|
|
@@ -153,7 +161,9 @@ export default {
|
|
|
backgroundColor: "transparent",
|
|
|
// handleIcon: "path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z",
|
|
|
handleStyle: {
|
|
|
- color: partten.getColor("green"),
|
|
|
+ color: this.$store.state.themeName === "dark"
|
|
|
+ ? partten.getColor("green")
|
|
|
+ : partten.getColor("blue"),
|
|
|
},
|
|
|
moveHandleSize: 0,
|
|
|
// dataBackground: {
|
|
@@ -174,9 +184,13 @@ export default {
|
|
|
// },
|
|
|
fillerColor: "transparent",
|
|
|
textStyle: {
|
|
|
- color: partten.getColor("grayl"),
|
|
|
+ color: this.$store.state.themeName === "dark"
|
|
|
+ ? partten.getColor("grayl")
|
|
|
+ : "#000",
|
|
|
},
|
|
|
- borderColor: partten.getColor("gray"),
|
|
|
+ borderColor: this.$store.state.themeName === "dark"
|
|
|
+ ? partten.getColor("gray")
|
|
|
+ : "#000",
|
|
|
brushSelect: false,
|
|
|
},
|
|
|
],
|
|
@@ -184,7 +198,9 @@ export default {
|
|
|
{
|
|
|
type: "category",
|
|
|
axisLabel: {
|
|
|
- color: partten.getColor("gray"),
|
|
|
+ color: this.$store.state.themeName === "dark"
|
|
|
+ ? partten.getColor("gray")
|
|
|
+ : "#000",
|
|
|
},
|
|
|
inverse: true,
|
|
|
// minInterval: 10,
|
|
@@ -202,12 +218,16 @@ export default {
|
|
|
{
|
|
|
type: "value",
|
|
|
axisLabel: {
|
|
|
- color: partten.getColor("gray"),
|
|
|
+ color: this.$store.state.themeName === "dark"
|
|
|
+ ? partten.getColor("gray")
|
|
|
+ : "#000",
|
|
|
},
|
|
|
axisLine: {
|
|
|
type: "dashed",
|
|
|
lineStyle: {
|
|
|
- color: partten.getColor("gray"),
|
|
|
+ color: this.$store.state.themeName === "dark"
|
|
|
+ ? partten.getColor("gray")
|
|
|
+ : "#000",
|
|
|
},
|
|
|
width: 5,
|
|
|
},
|
|
@@ -218,7 +238,7 @@ export default {
|
|
|
lineStyle: {
|
|
|
type: "dashed",
|
|
|
dashOffset: 10,
|
|
|
- color: partten.getColor("gray") + 80,
|
|
|
+ color: this.$store.state.themeName === "dark" ? "#5a6162" : "#000" + 80,
|
|
|
},
|
|
|
},
|
|
|
},
|
|
@@ -269,10 +289,14 @@ export default {
|
|
|
smooth: false, //平滑展示
|
|
|
xAxisIndex: 1,
|
|
|
lineStyle: {
|
|
|
- color: partten.getColor("green"),
|
|
|
+ color: this.$store.state.themeName === "dark"
|
|
|
+ ? partten.getColor("green")
|
|
|
+ : partten.getColor("blue"),
|
|
|
},
|
|
|
itemStyle: {
|
|
|
- color: partten.getColor("green"),
|
|
|
+ color: this.$store.state.themeName === "dark"
|
|
|
+ ? partten.getColor("green")
|
|
|
+ : partten.getColor("blue"),
|
|
|
},
|
|
|
});
|
|
|
}
|
|
@@ -315,6 +339,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ "$store.state.themeName"() {
|
|
|
+ this.initChart();
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|