Support dynamic dark/light themes

This commit is contained in:
2022-03-30 19:35:26 +02:00
parent e18e4303b3
commit 13f697e5de
45 changed files with 194 additions and 261 deletions

View File

@@ -1,6 +1,7 @@
<script>
import { onMount } from "svelte";
import { formatDataVolume, formatNumber } from "./Formatting.svelte";
import { color_by_name } from "./Util.svelte";
import {
Chart,
PointElement,
@@ -38,7 +39,7 @@ export const update = () => {
return chart_object.update()
}
Chart.defaults.color = "#"+window.style.bodyTextColor;
Chart.defaults.color = color_by_name("body_text_color");
Chart.defaults.font.size = 15;
Chart.defaults.font.family = "system-ui, sans-serif";
Chart.defaults.maintainAspectRatio = false;
@@ -91,7 +92,7 @@ onMount(() => {
grid: {
display: true,
drawBorder: false,
color: "#"+window.style.separatorColor,
color: color_by_name("separator"),
},
},
x: {