diff --git a/ts/graphs/BUILD.bazel b/ts/graphs/BUILD.bazel index 0db44c94d..34d8083bc 100644 --- a/ts/graphs/BUILD.bazel +++ b/ts/graphs/BUILD.bazel @@ -71,6 +71,7 @@ ts_library( "@npm//d3-transition", "@npm//lodash.debounce", "@npm//lodash.throttle", + "@npm//svelte", ], ) diff --git a/ts/graphs/CardCounts.svelte b/ts/graphs/CardCounts.svelte index 3a8489632..5f6675138 100644 --- a/ts/graphs/CardCounts.svelte +++ b/ts/graphs/CardCounts.svelte @@ -5,11 +5,11 @@ import type pb from "anki/backend_proto"; import type { I18n } from "anki/i18n"; import SeparateInactiveCheckbox from "./SeparateInactiveCheckbox.svelte"; + import { cardCountsSeparateInactive } from "./preferences"; export let sourceData: pb.BackendProto.GraphsOut; export let i18n: I18n; - let separateInactive = true; let svg = null as HTMLElement | SVGElement | null; let bounds = defaultGraphBounds(); @@ -20,7 +20,7 @@ let tableData = (null as unknown) as TableDatum[]; $: { - graphData = gatherData(sourceData, separateInactive, i18n); + graphData = gatherData(sourceData, $cardCountsSeparateInactive, i18n); tableData = renderCards(svg as any, bounds, graphData); } @@ -56,7 +56,7 @@