Anki/ts/graphs/NoDataOverlay.svelte
Henrik Giesel 8a839a844e Move lib/i18n/translate to lib/translate
* This restores tree shaking
2021-10-04 02:34:03 +02:00

30 lines
711 B
Svelte

<!--
Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="typescript">
import type { GraphBounds } from "./graph-helpers";
import * as tr from "../lib/translate";
export let bounds: GraphBounds;
const noData = tr.statisticsNoData();
</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>
</g>
<style lang="scss">
.no-data {
rect {
fill: var(--window-bg);
}
text {
text-anchor: middle;
fill: grey;
}
}
</style>