|
@@ -289,7 +289,7 @@ export default {
|
|
|
return {
|
|
|
id: "",
|
|
|
chart: null,
|
|
|
- color: ["#323E6F", "#1DA0D7", "#05BB4C", "#EDB32F", "#DB5520"],
|
|
|
+ color: ["#1DA0D7","#05BB4C","#323E6F", "#EDB32F", "#DB5520"],
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -336,7 +336,7 @@ export default {
|
|
|
//分格线
|
|
|
splitLine: {
|
|
|
lineStyle: {
|
|
|
- color: partten.getColor("gray"),
|
|
|
+ color: this.$store.state.themeName === "dark" ? partten.getColor("gray") : partten.getColor("black"),
|
|
|
type: "dashed",
|
|
|
},
|
|
|
},
|
|
@@ -385,8 +385,9 @@ export default {
|
|
|
methods: {
|
|
|
resize() {},
|
|
|
initChart() {
|
|
|
+
|
|
|
const chart = echarts.init(this.$el);
|
|
|
-
|
|
|
+
|
|
|
let option = this.option();
|
|
|
chart.clear();
|
|
|
|
|
@@ -406,16 +407,18 @@ export default {
|
|
|
window.addEventListener("resize", this.resize);
|
|
|
},
|
|
|
option: function () {
|
|
|
+ let themeName = '';
|
|
|
+ this.$store.state.themeName === "dark" ? themeName = true : themeName = false;
|
|
|
return {
|
|
|
color: this.color,
|
|
|
tooltip: {
|
|
|
trigger: "axis",
|
|
|
triggerOn:this.default?"click":"mousemove",
|
|
|
alwaysShowContent:true,
|
|
|
- backgroundColor: "rgba(0,0,0,0.4)",
|
|
|
- borderColor: partten.getColor("gray"),
|
|
|
+ backgroundColor: themeName ? "rgba(0,0,0,0.4)" : "rgba(255,255,255,0.5)",
|
|
|
+ borderColor: themeName ? partten.getColor("gray"): "#000",
|
|
|
textStyle: {
|
|
|
- color: "#fff",
|
|
|
+ color: themeName ? "#fff" : "#000",
|
|
|
fontSize: 12,
|
|
|
},
|
|
|
},
|
|
@@ -425,9 +428,9 @@ export default {
|
|
|
top: "top",
|
|
|
icon: "circle",
|
|
|
itemWidth: 6,
|
|
|
- inactiveColor: partten.getColor("gray"),
|
|
|
+ inactiveColor: themeName ? partten.getColor("gray"): "#000",
|
|
|
textStyle: {
|
|
|
- color: partten.getColor("grayl"),
|
|
|
+ color: themeName ? partten.getColor("grayl"): "#000",
|
|
|
fontSize: 12,
|
|
|
},
|
|
|
},
|
|
@@ -452,7 +455,7 @@ export default {
|
|
|
formatter: "{value}",
|
|
|
fontSize: 12,
|
|
|
textStyle: {
|
|
|
- color: partten.getColor("gray"),
|
|
|
+ color: themeName ? partten.getColor("gray"): "#000",
|
|
|
},
|
|
|
},
|
|
|
data: this.xdata,
|