30bbbaf00b
* Make eslint sort our imports * fix missing deps in eslint rule (dae) Caught on Linux due to the stricter sandboxing * Remove exports-last eslint rule (for now?) * Adjust browserslist settings - We use ResizeObserver which is not supported in browsers like KaiOS, Baidu or Android UC * Raise minimum iOS version 13.4 - It's the first version that supports ResizeObserver * Apply new eslint rules to sort imports
29 lines
969 B
Svelte
29 lines
969 B
Svelte
<!--
|
|
Copyright: Ankitects Pty Ltd and contributors
|
|
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
-->
|
|
<script lang="ts">
|
|
import AxisTicks from "./AxisTicks.svelte";
|
|
import CumulativeOverlay from "./CumulativeOverlay.svelte";
|
|
import { defaultGraphBounds } from "./graph-helpers";
|
|
import type { HistogramData } from "./histogram-graph";
|
|
import { histogramGraph } from "./histogram-graph";
|
|
import HoverColumns from "./HoverColumns.svelte";
|
|
import NoDataOverlay from "./NoDataOverlay.svelte";
|
|
|
|
export let data: HistogramData | null = null;
|
|
|
|
const bounds = defaultGraphBounds();
|
|
let svg = null as HTMLElement | SVGElement | null;
|
|
|
|
$: histogramGraph(svg as SVGElement, bounds, data);
|
|
</script>
|
|
|
|
<svg bind:this={svg} viewBox={`0 0 ${bounds.width} ${bounds.height}`}>
|
|
<g class="bars" />
|
|
<HoverColumns />
|
|
<CumulativeOverlay />
|
|
<AxisTicks {bounds} />
|
|
<NoDataOverlay {bounds} />
|
|
</svg>
|