anki/ts/graphs/NoDataOverlay.svelte

13 lines
429 B
Svelte
Raw Normal View History

2020-07-06 06:01:49 +02:00
<script lang="typescript">
import type { I18n } from "anki/ts/lib/i18n";
import type { GraphBounds } from "./graph-helpers";
2020-07-06 06:01:49 +02:00
export let bounds: GraphBounds;
export let i18n: I18n;
const noData = i18n.tr(i18n.TR.STATISTICS_NO_DATA);
</script>
<g class="no-data">
<rect x="0" y="0" width={bounds.width} height={bounds.height} />
<text x="{bounds.width / 2}," y={bounds.height / 2}>{noData}</text>
2020-07-06 06:01:49 +02:00
</g>