This commit is contained in:
Fine 2025-02-17 10:43:35 +08:00
parent af0b3ab17b
commit 209f3e38f2
2 changed files with 42 additions and 12 deletions

View File

@ -75,6 +75,28 @@ limitations under the License. -->
}; };
}); });
const color: string[] = chartColors(); const color: string[] = chartColors();
const legend =
appStore.theme === Themes.Dark
? {
pageIconColor: "#ccc",
pageIconInactiveColor: "#444",
backgroundColor: "#333",
borderColor: "#fff",
textStyle: {
fontSize: 12,
color: "#eee",
},
}
: {
pageIconColor: "#666",
pageIconInactiveColor: "#ccc",
backgroundColor: appStore.theme === Themes.Dark ? "#333" : "#fff",
borderColor: appStore.theme === Themes.Dark ? "#333" : "#fff",
textStyle: {
fontSize: 12,
color: "#333",
},
};
return { return {
color, color,
tooltip: { tooltip: {
@ -94,12 +116,7 @@ limitations under the License. -->
top: 0, top: 0,
left: 0, left: 0,
itemWidth: 12, itemWidth: 12,
backgroundColor: appStore.theme === Themes.Dark ? "#333" : "#fff", ...legend,
borderColor: appStore.theme === Themes.Dark ? "#333" : "#fff",
textStyle: {
fontSize: 12,
color: appStore.theme === Themes.Dark ? "#eee" : "#333",
},
}, },
grid: { grid: {
top: keys.length === 1 ? 15 : 40, top: keys.length === 1 ? 15 : 40,

View File

@ -123,7 +123,24 @@ limitations under the License. -->
color: appStore.theme === Themes.Dark ? "#eee" : "#333", color: appStore.theme === Themes.Dark ? "#eee" : "#333",
}, },
}; };
const legend =
appStore.theme === Themes.Dark
? {
pageIconColor: "#ccc",
pageIconInactiveColor: "#444",
textStyle: {
fontSize: 12,
color: "#eee",
},
}
: {
pageIconColor: "#666",
pageIconInactiveColor: "#ccc",
textStyle: {
fontSize: 12,
color: "#333",
},
};
return { return {
color, color,
tooltip: props.config.smallTips ? tips : tooltip, tooltip: props.config.smallTips ? tips : tooltip,
@ -134,11 +151,7 @@ limitations under the License. -->
top: 0, top: 0,
left: 0, left: 0,
itemWidth: 12, itemWidth: 12,
pageIconColor: appStore.theme === Themes.Dark ? "#ccc" : "#666", ...legend,
pageIconInactiveColor: appStore.theme === Themes.Dark ? "#444" : "#ccc",
textStyle: {
color: appStore.theme === Themes.Dark ? "#fff" : "#333",
},
selector: [ selector: [
{ {
type: "all", type: "all",