@samizdata/mozaic 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -0
- package/README.md +44 -2
- package/dist/annotations/Arrow.svelte +50 -0
- package/dist/annotations/Arrow.svelte.d.ts +18 -0
- package/dist/annotations/Callout.svelte +87 -0
- package/dist/annotations/Callout.svelte.d.ts +22 -0
- package/dist/annotations/Label.svelte +55 -0
- package/dist/annotations/Label.svelte.d.ts +19 -0
- package/dist/annotations/RefBand.svelte +46 -0
- package/dist/annotations/RefBand.svelte.d.ts +18 -0
- package/dist/annotations/RefLine.svelte +72 -0
- package/dist/annotations/RefLine.svelte.d.ts +19 -0
- package/dist/annotations/callout-geometry.d.ts +23 -0
- package/dist/annotations/callout-geometry.js +45 -0
- package/dist/annotations/index.d.ts +6 -0
- package/dist/annotations/index.js +6 -0
- package/dist/core/Canvas.svelte +55 -0
- package/dist/core/Canvas.svelte.d.ts +19 -0
- package/dist/core/Facets.svelte +80 -0
- package/dist/core/Facets.svelte.d.ts +49 -0
- package/dist/core/Html.svelte +38 -0
- package/dist/core/Html.svelte.d.ts +13 -0
- package/dist/core/Plot.svelte +202 -0
- package/dist/core/Plot.svelte.d.ts +60 -0
- package/dist/core/Svg.svelte +58 -0
- package/dist/core/Svg.svelte.d.ts +17 -0
- package/dist/core/accessor.d.ts +5 -0
- package/dist/core/accessor.js +3 -0
- package/dist/core/context.d.ts +25 -0
- package/dist/core/context.js +69 -0
- package/dist/core/index.d.ts +10 -0
- package/dist/core/index.js +9 -0
- package/dist/core/scales.d.ts +16 -0
- package/dist/core/scales.js +32 -0
- package/dist/core/types.d.ts +78 -0
- package/dist/core/types.js +1 -0
- package/dist/core/units.d.ts +6 -0
- package/dist/core/units.js +10 -0
- package/dist/embed/Embed.svelte +50 -0
- package/dist/embed/Embed.svelte.d.ts +14 -0
- package/dist/embed/code.d.ts +18 -0
- package/dist/embed/code.js +9 -0
- package/dist/embed/host.d.ts +6 -0
- package/dist/embed/host.js +20 -0
- package/dist/embed/index.d.ts +6 -0
- package/dist/embed/index.js +5 -0
- package/dist/embed/manifest.d.ts +16 -0
- package/dist/embed/manifest.js +1 -0
- package/dist/embed/params.svelte.d.ts +10 -0
- package/dist/embed/params.svelte.js +27 -0
- package/dist/embed/resize.d.ts +13 -0
- package/dist/embed/resize.js +28 -0
- package/dist/export/download.d.ts +13 -0
- package/dist/export/download.js +52 -0
- package/dist/export/figure-to-svg.d.ts +21 -0
- package/dist/export/figure-to-svg.js +187 -0
- package/dist/export/fonts.d.ts +26 -0
- package/dist/export/fonts.js +112 -0
- package/dist/export/index.d.ts +2 -0
- package/dist/export/index.js +2 -0
- package/dist/frame/Byline.svelte +26 -0
- package/dist/frame/Byline.svelte.d.ts +8 -0
- package/dist/frame/Chart.svelte +144 -0
- package/dist/frame/Chart.svelte.d.ts +37 -0
- package/dist/frame/ChartTools.svelte +259 -0
- package/dist/frame/ChartTools.svelte.d.ts +17 -0
- package/dist/frame/DataDownload.svelte +34 -0
- package/dist/frame/DataDownload.svelte.d.ts +34 -0
- package/dist/frame/DataTable.svelte +49 -0
- package/dist/frame/DataTable.svelte.d.ts +34 -0
- package/dist/frame/Footer.svelte +39 -0
- package/dist/frame/Footer.svelte.d.ts +10 -0
- package/dist/frame/Header.svelte +21 -0
- package/dist/frame/Header.svelte.d.ts +9 -0
- package/dist/frame/Logo.svelte +57 -0
- package/dist/frame/Logo.svelte.d.ts +8 -0
- package/dist/frame/Notes.svelte +29 -0
- package/dist/frame/Notes.svelte.d.ts +9 -0
- package/dist/frame/Source.svelte +29 -0
- package/dist/frame/Source.svelte.d.ts +9 -0
- package/dist/frame/Subtitle.svelte +22 -0
- package/dist/frame/Subtitle.svelte.d.ts +9 -0
- package/dist/frame/Title.svelte +31 -0
- package/dist/frame/Title.svelte.d.ts +9 -0
- package/dist/frame/index.d.ts +12 -0
- package/dist/frame/index.js +12 -0
- package/dist/guides/AxisX.svelte +101 -0
- package/dist/guides/AxisX.svelte.d.ts +22 -0
- package/dist/guides/AxisY.svelte +84 -0
- package/dist/guides/AxisY.svelte.d.ts +21 -0
- package/dist/guides/ColorRamp.svelte +93 -0
- package/dist/guides/ColorRamp.svelte.d.ts +25 -0
- package/dist/guides/GridX.svelte +35 -0
- package/dist/guides/GridX.svelte.d.ts +9 -0
- package/dist/guides/GridY.svelte +35 -0
- package/dist/guides/GridY.svelte.d.ts +9 -0
- package/dist/guides/Key.svelte +48 -0
- package/dist/guides/Key.svelte.d.ts +14 -0
- package/dist/guides/Legend.svelte +112 -0
- package/dist/guides/Legend.svelte.d.ts +26 -0
- package/dist/guides/SizeLegend.svelte +62 -0
- package/dist/guides/SizeLegend.svelte.d.ts +15 -0
- package/dist/guides/index.d.ts +9 -0
- package/dist/guides/index.js +9 -0
- package/dist/guides/ticks.d.ts +6 -0
- package/dist/guides/ticks.js +15 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +14 -0
- package/dist/interactive/ButtonGroup.svelte +98 -0
- package/dist/interactive/ButtonGroup.svelte.d.ts +42 -0
- package/dist/interactive/PointerArea.svelte +49 -0
- package/dist/interactive/PointerArea.svelte.d.ts +18 -0
- package/dist/interactive/Scroller.svelte +147 -0
- package/dist/interactive/Scroller.svelte.d.ts +54 -0
- package/dist/interactive/Tooltip.svelte +66 -0
- package/dist/interactive/Tooltip.svelte.d.ts +19 -0
- package/dist/interactive/index.d.ts +4 -0
- package/dist/interactive/index.js +4 -0
- package/dist/interactive/tooltip-position.d.ts +12 -0
- package/dist/interactive/tooltip-position.js +16 -0
- package/dist/locale/definitions.d.ts +145 -0
- package/dist/locale/definitions.js +138 -0
- package/dist/locale/index.d.ts +23 -0
- package/dist/locale/index.js +34 -0
- package/dist/marks/Arcs.svelte +93 -0
- package/dist/marks/Arcs.svelte.d.ts +47 -0
- package/dist/marks/Area.svelte +44 -0
- package/dist/marks/Area.svelte.d.ts +43 -0
- package/dist/marks/Arrows.svelte +93 -0
- package/dist/marks/Arrows.svelte.d.ts +50 -0
- package/dist/marks/Bars.svelte +111 -0
- package/dist/marks/Bars.svelte.d.ts +61 -0
- package/dist/marks/Beeswarm.svelte +84 -0
- package/dist/marks/Beeswarm.svelte.d.ts +42 -0
- package/dist/marks/Dumbbell.svelte +71 -0
- package/dist/marks/Dumbbell.svelte.d.ts +42 -0
- package/dist/marks/GeoPath.svelte +56 -0
- package/dist/marks/GeoPath.svelte.d.ts +42 -0
- package/dist/marks/Hemicycle.svelte +182 -0
- package/dist/marks/Hemicycle.svelte.d.ts +78 -0
- package/dist/marks/Intervals.svelte +128 -0
- package/dist/marks/Intervals.svelte.d.ts +60 -0
- package/dist/marks/Line.svelte +64 -0
- package/dist/marks/Line.svelte.d.ts +43 -0
- package/dist/marks/LineEndLabels.svelte +70 -0
- package/dist/marks/LineEndLabels.svelte.d.ts +41 -0
- package/dist/marks/Points.svelte +70 -0
- package/dist/marks/Points.svelte.d.ts +46 -0
- package/dist/marks/Rects.svelte +92 -0
- package/dist/marks/Rects.svelte.d.ts +47 -0
- package/dist/marks/Rules.svelte +46 -0
- package/dist/marks/Rules.svelte.d.ts +15 -0
- package/dist/marks/Slope.svelte +112 -0
- package/dist/marks/Slope.svelte.d.ts +41 -0
- package/dist/marks/Text.svelte +75 -0
- package/dist/marks/Text.svelte.d.ts +47 -0
- package/dist/marks/Treemap.svelte +89 -0
- package/dist/marks/Treemap.svelte.d.ts +45 -0
- package/dist/marks/Voronoi.svelte +61 -0
- package/dist/marks/Voronoi.svelte.d.ts +39 -0
- package/dist/marks/Waffle.svelte +69 -0
- package/dist/marks/Waffle.svelte.d.ts +41 -0
- package/dist/marks/bar-path.d.ts +5 -0
- package/dist/marks/bar-path.js +15 -0
- package/dist/marks/index.d.ts +20 -0
- package/dist/marks/index.js +20 -0
- package/dist/recipes/ArrowChart.svelte +247 -0
- package/dist/recipes/ArrowChart.svelte.d.ts +73 -0
- package/dist/recipes/BarChart.svelte +122 -0
- package/dist/recipes/BarChart.svelte.d.ts +58 -0
- package/dist/recipes/BarDotChart.svelte +204 -0
- package/dist/recipes/BarDotChart.svelte.d.ts +75 -0
- package/dist/recipes/ColumnChart.svelte +119 -0
- package/dist/recipes/ColumnChart.svelte.d.ts +56 -0
- package/dist/recipes/LineChart.svelte +159 -0
- package/dist/recipes/LineChart.svelte.d.ts +61 -0
- package/dist/recipes/MosaicChart.svelte +256 -0
- package/dist/recipes/MosaicChart.svelte.d.ts +83 -0
- package/dist/recipes/ScatterChart.svelte +167 -0
- package/dist/recipes/ScatterChart.svelte.d.ts +63 -0
- package/dist/recipes/StackedBarChart.svelte +222 -0
- package/dist/recipes/StackedBarChart.svelte.d.ts +83 -0
- package/dist/recipes/index.d.ts +10 -0
- package/dist/recipes/index.js +19 -0
- package/dist/styles/base.d.ts +5 -0
- package/dist/styles/base.js +102 -0
- package/dist/styles/check.d.ts +8 -0
- package/dist/styles/check.js +32 -0
- package/dist/styles/color.d.ts +11 -0
- package/dist/styles/color.js +29 -0
- package/dist/styles/index.d.ts +9 -0
- package/dist/styles/index.js +17 -0
- package/dist/styles/types.d.ts +90 -0
- package/dist/styles/types.js +1 -0
- package/dist/table/Sparkline.svelte +59 -0
- package/dist/table/Sparkline.svelte.d.ts +16 -0
- package/dist/table/Table.svelte +287 -0
- package/dist/table/Table.svelte.d.ts +44 -0
- package/dist/table/csv.d.ts +3 -0
- package/dist/table/csv.js +12 -0
- package/dist/table/index.d.ts +4 -0
- package/dist/table/index.js +3 -0
- package/dist/table/types.d.ts +26 -0
- package/dist/table/types.js +1 -0
- package/dist/transforms/bin.d.ts +15 -0
- package/dist/transforms/bin.js +18 -0
- package/dist/transforms/dodge.d.ts +10 -0
- package/dist/transforms/dodge.js +35 -0
- package/dist/transforms/group.d.ts +14 -0
- package/dist/transforms/group.js +14 -0
- package/dist/transforms/hemicycle.d.ts +30 -0
- package/dist/transforms/hemicycle.js +51 -0
- package/dist/transforms/index.d.ts +8 -0
- package/dist/transforms/index.js +8 -0
- package/dist/transforms/labels.d.ts +6 -0
- package/dist/transforms/labels.js +20 -0
- package/dist/transforms/smooth.d.ts +61 -0
- package/dist/transforms/smooth.js +105 -0
- package/dist/transforms/stack.d.ts +25 -0
- package/dist/transforms/stack.js +61 -0
- package/dist/transforms/treemap.d.ts +21 -0
- package/dist/transforms/treemap.js +31 -0
- package/package.json +152 -3
- package/src/lib/recipes/ArrowChart.svelte +247 -0
- package/src/lib/recipes/BarChart.svelte +122 -0
- package/src/lib/recipes/BarDotChart.svelte +204 -0
- package/src/lib/recipes/ColumnChart.svelte +119 -0
- package/src/lib/recipes/LineChart.svelte +159 -0
- package/src/lib/recipes/MosaicChart.svelte +256 -0
- package/src/lib/recipes/ScatterChart.svelte +167 -0
- package/src/lib/recipes/StackedBarChart.svelte +222 -0
- package/src/lib/recipes/index.ts +20 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Column } from '../table/types.js';
|
|
2
|
+
declare function $$render<T>(): {
|
|
3
|
+
props: {
|
|
4
|
+
data: T[];
|
|
5
|
+
columns: Pick<Column<T>, "label" | "value">[];
|
|
6
|
+
/** File name without extension. */
|
|
7
|
+
filename?: string;
|
|
8
|
+
};
|
|
9
|
+
exports: {};
|
|
10
|
+
bindings: "";
|
|
11
|
+
slots: {};
|
|
12
|
+
events: {};
|
|
13
|
+
};
|
|
14
|
+
declare class __sveltets_Render<T> {
|
|
15
|
+
props(): ReturnType<typeof $$render<T>>['props'];
|
|
16
|
+
events(): ReturnType<typeof $$render<T>>['events'];
|
|
17
|
+
slots(): ReturnType<typeof $$render<T>>['slots'];
|
|
18
|
+
bindings(): "";
|
|
19
|
+
exports(): {};
|
|
20
|
+
}
|
|
21
|
+
interface $$IsomorphicComponent {
|
|
22
|
+
new <T>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T>['props']>, ReturnType<__sveltets_Render<T>['events']>, ReturnType<__sveltets_Render<T>['slots']>> & {
|
|
23
|
+
$$bindings?: ReturnType<__sveltets_Render<T>['bindings']>;
|
|
24
|
+
} & ReturnType<__sveltets_Render<T>['exports']>;
|
|
25
|
+
<T>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {}): ReturnType<__sveltets_Render<T>['exports']>;
|
|
26
|
+
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A "Download the data (CSV)" link built from the chart's rows. Works without
|
|
30
|
+
* JavaScript (the CSV is inlined as a data URL). Hidden in print.
|
|
31
|
+
*/
|
|
32
|
+
declare const DataDownload: $$IsomorphicComponent;
|
|
33
|
+
type DataDownload<T> = InstanceType<typeof DataDownload<T>>;
|
|
34
|
+
export default DataDownload;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
The chart's data as a table, so the values are available to screen readers and anyone who wants the
|
|
4
|
+
numbers: a "Show the data" button among the icons under the chart opens it. Outside `<Chart>` it is a
|
|
5
|
+
collapsed "Show the data" section. Hidden in print.
|
|
6
|
+
-->
|
|
7
|
+
<script lang="ts" generics="T">
|
|
8
|
+
import { onDestroy } from 'svelte';
|
|
9
|
+
import { useChart } from '../core/context.js';
|
|
10
|
+
import Table from '../table/Table.svelte';
|
|
11
|
+
import type { Column } from '../table/types.js';
|
|
12
|
+
|
|
13
|
+
let { data, columns, maxRows }: { data: T[]; columns: Column<T>[]; maxRows?: number } = $props();
|
|
14
|
+
|
|
15
|
+
const chart = useChart();
|
|
16
|
+
const tools = chart.tools;
|
|
17
|
+
if (tools) {
|
|
18
|
+
// Cast: a linked package can see another copy of svelte's Snippet type.
|
|
19
|
+
tools.table = table as unknown as NonNullable<typeof tools.table>;
|
|
20
|
+
onDestroy(() => {
|
|
21
|
+
if (tools.table === table) tools.table = null;
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
{#snippet table()}
|
|
27
|
+
<Table {data} {columns} {maxRows} />
|
|
28
|
+
{/snippet}
|
|
29
|
+
|
|
30
|
+
{#if chart.medium !== 'print' && !tools}
|
|
31
|
+
<details class="mz-data-table">
|
|
32
|
+
<summary>{chart.locale.strings.showData}</summary>
|
|
33
|
+
{@render table()}
|
|
34
|
+
</details>
|
|
35
|
+
{/if}
|
|
36
|
+
|
|
37
|
+
<style>
|
|
38
|
+
.mz-data-table {
|
|
39
|
+
font-size: var(--mz-size-small);
|
|
40
|
+
}
|
|
41
|
+
summary {
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
color: var(--mz-color-muted);
|
|
44
|
+
font-family: var(--mz-font-label);
|
|
45
|
+
font-weight: var(--mz-weight-label);
|
|
46
|
+
text-transform: var(--mz-label-transform);
|
|
47
|
+
letter-spacing: var(--mz-label-tracking);
|
|
48
|
+
}
|
|
49
|
+
</style>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Column } from '../table/types.js';
|
|
2
|
+
declare function $$render<T>(): {
|
|
3
|
+
props: {
|
|
4
|
+
data: T[];
|
|
5
|
+
columns: Column<T>[];
|
|
6
|
+
maxRows?: number;
|
|
7
|
+
};
|
|
8
|
+
exports: {};
|
|
9
|
+
bindings: "";
|
|
10
|
+
slots: {};
|
|
11
|
+
events: {};
|
|
12
|
+
};
|
|
13
|
+
declare class __sveltets_Render<T> {
|
|
14
|
+
props(): ReturnType<typeof $$render<T>>['props'];
|
|
15
|
+
events(): ReturnType<typeof $$render<T>>['events'];
|
|
16
|
+
slots(): ReturnType<typeof $$render<T>>['slots'];
|
|
17
|
+
bindings(): "";
|
|
18
|
+
exports(): {};
|
|
19
|
+
}
|
|
20
|
+
interface $$IsomorphicComponent {
|
|
21
|
+
new <T>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T>['props']>, ReturnType<__sveltets_Render<T>['events']>, ReturnType<__sveltets_Render<T>['slots']>> & {
|
|
22
|
+
$$bindings?: ReturnType<__sveltets_Render<T>['bindings']>;
|
|
23
|
+
} & ReturnType<__sveltets_Render<T>['exports']>;
|
|
24
|
+
<T>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {}): ReturnType<__sveltets_Render<T>['exports']>;
|
|
25
|
+
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The chart's data as a table, so the values are available to screen readers and anyone who wants the
|
|
29
|
+
* numbers: a "Show the data" button among the icons under the chart opens it. Outside `<Chart>` it is a
|
|
30
|
+
* collapsed "Show the data" section. Hidden in print.
|
|
31
|
+
*/
|
|
32
|
+
declare const DataTable: $$IsomorphicComponent;
|
|
33
|
+
type DataTable<T> = InstanceType<typeof DataTable<T>>;
|
|
34
|
+
export default DataTable;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
Notes, sources and credits below the plot, with the house wordmark on the right.
|
|
4
|
+
-->
|
|
5
|
+
<script lang="ts">
|
|
6
|
+
import type { Snippet } from 'svelte';
|
|
7
|
+
import Logo from './Logo.svelte';
|
|
8
|
+
|
|
9
|
+
let {
|
|
10
|
+
logo = true,
|
|
11
|
+
class: className = '',
|
|
12
|
+
children
|
|
13
|
+
}: { logo?: boolean; class?: string; children?: Snippet } = $props();
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<footer class="mz-footer {className}">
|
|
17
|
+
<div class="mz-footer-text">
|
|
18
|
+
{@render children?.()}
|
|
19
|
+
</div>
|
|
20
|
+
{#if logo}<Logo />{/if}
|
|
21
|
+
</footer>
|
|
22
|
+
|
|
23
|
+
<style>
|
|
24
|
+
.mz-footer {
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: flex-end;
|
|
27
|
+
justify-content: space-between;
|
|
28
|
+
gap: 1rem;
|
|
29
|
+
font-size: var(--mz-size-small);
|
|
30
|
+
line-height: 1.4;
|
|
31
|
+
color: var(--mz-color-muted);
|
|
32
|
+
}
|
|
33
|
+
.mz-footer-text {
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
gap: 0.25rem;
|
|
37
|
+
min-width: 0;
|
|
38
|
+
}
|
|
39
|
+
</style>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
logo?: boolean;
|
|
4
|
+
class?: string;
|
|
5
|
+
children?: Snippet;
|
|
6
|
+
};
|
|
7
|
+
/** Notes, sources and credits below the plot, with the house wordmark on the right. */
|
|
8
|
+
declare const Footer: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
9
|
+
type Footer = ReturnType<typeof Footer>;
|
|
10
|
+
export default Footer;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
Groups the title, subtitle and any legend above the plot.
|
|
4
|
+
-->
|
|
5
|
+
<script lang="ts">
|
|
6
|
+
import type { Snippet } from 'svelte';
|
|
7
|
+
|
|
8
|
+
let { class: className = '', children }: { class?: string; children?: Snippet } = $props();
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<header class="mz-header {className}">
|
|
12
|
+
{@render children?.()}
|
|
13
|
+
</header>
|
|
14
|
+
|
|
15
|
+
<style>
|
|
16
|
+
.mz-header {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
gap: 0.375rem;
|
|
20
|
+
}
|
|
21
|
+
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
class?: string;
|
|
4
|
+
children?: Snippet;
|
|
5
|
+
};
|
|
6
|
+
/** Groups the title, subtitle and any legend above the plot. */
|
|
7
|
+
declare const Header: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
8
|
+
type Header = ReturnType<typeof Header>;
|
|
9
|
+
export default Header;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
The house logo in the chart footer: the style's SVG mark and/or text
|
|
4
|
+
wordmark, labelled with the brand name for screen readers, and a link when
|
|
5
|
+
the style gives one.
|
|
6
|
+
-->
|
|
7
|
+
<script lang="ts">
|
|
8
|
+
import { useChart } from '../core/context.js';
|
|
9
|
+
|
|
10
|
+
const chart = useChart();
|
|
11
|
+
const logo = $derived(chart.theme.logo);
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
{#snippet contents(logo: NonNullable<typeof chart.theme.logo>)}
|
|
15
|
+
{#if logo.svg}
|
|
16
|
+
<span class="mz-logo-mark" style:height="{logo.height ?? 16}px" aria-hidden="true">
|
|
17
|
+
<!-- eslint-disable-next-line svelte/no-at-html-tags -- trusted markup from the style file -->
|
|
18
|
+
{@html logo.svg}
|
|
19
|
+
</span>
|
|
20
|
+
{/if}
|
|
21
|
+
{#if logo.text}<span class="mz-logo-text" aria-hidden="true">{logo.text}</span>{/if}
|
|
22
|
+
{/snippet}
|
|
23
|
+
|
|
24
|
+
{#if logo?.href}
|
|
25
|
+
<a class="mz-logo" href={logo.href} target="_blank" rel="noopener" aria-label={logo.label}>{@render contents(logo)}</a
|
|
26
|
+
>
|
|
27
|
+
{:else if logo}
|
|
28
|
+
<span class="mz-logo" role="img" aria-label={logo.label}>{@render contents(logo)}</span>
|
|
29
|
+
{/if}
|
|
30
|
+
|
|
31
|
+
<style>
|
|
32
|
+
.mz-logo {
|
|
33
|
+
flex: none;
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
gap: 0.375rem;
|
|
37
|
+
color: var(--mz-color-text);
|
|
38
|
+
text-decoration: none;
|
|
39
|
+
}
|
|
40
|
+
a.mz-logo:hover .mz-logo-text {
|
|
41
|
+
text-decoration: underline;
|
|
42
|
+
}
|
|
43
|
+
.mz-logo-mark {
|
|
44
|
+
display: inline-flex;
|
|
45
|
+
}
|
|
46
|
+
.mz-logo-mark :global(svg) {
|
|
47
|
+
height: 100%;
|
|
48
|
+
width: auto;
|
|
49
|
+
}
|
|
50
|
+
.mz-logo-text {
|
|
51
|
+
font-family: var(--mz-font-title);
|
|
52
|
+
font-weight: var(--mz-weight-title);
|
|
53
|
+
font-size: var(--mz-size-small);
|
|
54
|
+
letter-spacing: 0.04em;
|
|
55
|
+
line-height: 1;
|
|
56
|
+
}
|
|
57
|
+
</style>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The house logo in the chart footer: the style's SVG mark and/or text
|
|
3
|
+
* wordmark, labelled with the brand name for screen readers, and a link when
|
|
4
|
+
* the style gives one.
|
|
5
|
+
*/
|
|
6
|
+
declare const Logo: import("svelte").Component<Record<string, never>, {}, "">;
|
|
7
|
+
type Logo = ReturnType<typeof Logo>;
|
|
8
|
+
export default Logo;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
"Note: …", with the label in the chart's language. Set `plural` for several notes.
|
|
4
|
+
-->
|
|
5
|
+
<script lang="ts">
|
|
6
|
+
import type { Snippet } from 'svelte';
|
|
7
|
+
import { useChart } from '../core/context.js';
|
|
8
|
+
|
|
9
|
+
let { plural = false, children }: { plural?: boolean; children?: Snippet } = $props();
|
|
10
|
+
|
|
11
|
+
const chart = useChart();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<p class="mz-notes">
|
|
15
|
+
<span class="mz-label">{plural ? chart.locale.strings.notes : chart.locale.strings.note}:</span>
|
|
16
|
+
{@render children?.()}
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
<style>
|
|
20
|
+
.mz-notes {
|
|
21
|
+
margin: 0;
|
|
22
|
+
}
|
|
23
|
+
.mz-label {
|
|
24
|
+
font-family: var(--mz-font-label);
|
|
25
|
+
font-weight: var(--mz-weight-label);
|
|
26
|
+
text-transform: var(--mz-label-transform);
|
|
27
|
+
letter-spacing: var(--mz-label-tracking);
|
|
28
|
+
}
|
|
29
|
+
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
plural?: boolean;
|
|
4
|
+
children?: Snippet;
|
|
5
|
+
};
|
|
6
|
+
/** "Note: …", with the label in the chart's language. Set `plural` for several notes. */
|
|
7
|
+
declare const Notes: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
8
|
+
type Notes = ReturnType<typeof Notes>;
|
|
9
|
+
export default Notes;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
"Source: …", with the label in the chart's language. Set `plural` for several sources.
|
|
4
|
+
-->
|
|
5
|
+
<script lang="ts">
|
|
6
|
+
import type { Snippet } from 'svelte';
|
|
7
|
+
import { useChart } from '../core/context.js';
|
|
8
|
+
|
|
9
|
+
let { plural = false, children }: { plural?: boolean; children?: Snippet } = $props();
|
|
10
|
+
|
|
11
|
+
const chart = useChart();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<p class="mz-source">
|
|
15
|
+
<span class="mz-label">{plural ? chart.locale.strings.sources : chart.locale.strings.source}:</span>
|
|
16
|
+
{@render children?.()}
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
<style>
|
|
20
|
+
.mz-source {
|
|
21
|
+
margin: 0;
|
|
22
|
+
}
|
|
23
|
+
.mz-label {
|
|
24
|
+
font-family: var(--mz-font-label);
|
|
25
|
+
font-weight: var(--mz-weight-label);
|
|
26
|
+
text-transform: var(--mz-label-transform);
|
|
27
|
+
letter-spacing: var(--mz-label-tracking);
|
|
28
|
+
}
|
|
29
|
+
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
plural?: boolean;
|
|
4
|
+
children?: Snippet;
|
|
5
|
+
};
|
|
6
|
+
/** "Source: …", with the label in the chart's language. Set `plural` for several sources. */
|
|
7
|
+
declare const Source: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
8
|
+
type Source = ReturnType<typeof Source>;
|
|
9
|
+
export default Source;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
A line under the title saying what is measured, in which unit, over which period.
|
|
4
|
+
-->
|
|
5
|
+
<script lang="ts">
|
|
6
|
+
import type { Snippet } from 'svelte';
|
|
7
|
+
|
|
8
|
+
let { class: className = '', children }: { class?: string; children?: Snippet } = $props();
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<p class="mz-subtitle {className}">
|
|
12
|
+
{@render children?.()}
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<style>
|
|
16
|
+
.mz-subtitle {
|
|
17
|
+
margin: 0;
|
|
18
|
+
font-size: var(--mz-size-subtitle);
|
|
19
|
+
line-height: 1.35;
|
|
20
|
+
color: var(--mz-color-muted);
|
|
21
|
+
}
|
|
22
|
+
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
class?: string;
|
|
4
|
+
children?: Snippet;
|
|
5
|
+
};
|
|
6
|
+
/** A line under the title saying what is measured, in which unit, over which period. */
|
|
7
|
+
declare const Subtitle: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
8
|
+
type Subtitle = ReturnType<typeof Subtitle>;
|
|
9
|
+
export default Subtitle;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
The chart headline. Its id labels the chart's SVG for screen readers.
|
|
4
|
+
-->
|
|
5
|
+
<script lang="ts">
|
|
6
|
+
import type { Snippet } from 'svelte';
|
|
7
|
+
import { useChart } from '../core/context.js';
|
|
8
|
+
|
|
9
|
+
let { class: className = '', children }: { class?: string; children?: Snippet } = $props();
|
|
10
|
+
|
|
11
|
+
const chart = useChart();
|
|
12
|
+
// Inside a <Chart> (not the shared fallback context), tell the SVG layers there is a title to point to.
|
|
13
|
+
if (chart.ids.title) chart.ids.hasTitle = true;
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<h2 id={chart.ids.title || undefined} class="mz-title {className}">
|
|
17
|
+
{@render children?.()}
|
|
18
|
+
</h2>
|
|
19
|
+
|
|
20
|
+
<style>
|
|
21
|
+
.mz-title {
|
|
22
|
+
margin: 0;
|
|
23
|
+
font-family: var(--mz-font-title);
|
|
24
|
+
font-size: var(--mz-size-title);
|
|
25
|
+
font-weight: var(--mz-weight-title);
|
|
26
|
+
line-height: var(--mz-line-title);
|
|
27
|
+
letter-spacing: var(--mz-tracking-title);
|
|
28
|
+
color: var(--mz-color-text);
|
|
29
|
+
text-wrap: balance;
|
|
30
|
+
}
|
|
31
|
+
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
class?: string;
|
|
4
|
+
children?: Snippet;
|
|
5
|
+
};
|
|
6
|
+
/** The chart headline. Its id labels the chart's SVG for screen readers. */
|
|
7
|
+
declare const Title: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
8
|
+
type Title = ReturnType<typeof Title>;
|
|
9
|
+
export default Title;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { default as Chart } from './Chart.svelte';
|
|
2
|
+
export { default as Header } from './Header.svelte';
|
|
3
|
+
export { default as Title } from './Title.svelte';
|
|
4
|
+
export { default as Subtitle } from './Subtitle.svelte';
|
|
5
|
+
export { default as Footer } from './Footer.svelte';
|
|
6
|
+
export { default as Source } from './Source.svelte';
|
|
7
|
+
export { default as Notes } from './Notes.svelte';
|
|
8
|
+
export { default as Logo } from './Logo.svelte';
|
|
9
|
+
export { default as Byline } from './Byline.svelte';
|
|
10
|
+
export { default as DataTable } from './DataTable.svelte';
|
|
11
|
+
export { default as DataDownload } from './DataDownload.svelte';
|
|
12
|
+
export { setDownloads, useChart, useLocale, useTheme } from '../core/context.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { default as Chart } from './Chart.svelte';
|
|
2
|
+
export { default as Header } from './Header.svelte';
|
|
3
|
+
export { default as Title } from './Title.svelte';
|
|
4
|
+
export { default as Subtitle } from './Subtitle.svelte';
|
|
5
|
+
export { default as Footer } from './Footer.svelte';
|
|
6
|
+
export { default as Source } from './Source.svelte';
|
|
7
|
+
export { default as Notes } from './Notes.svelte';
|
|
8
|
+
export { default as Logo } from './Logo.svelte';
|
|
9
|
+
export { default as Byline } from './Byline.svelte';
|
|
10
|
+
export { default as DataTable } from './DataTable.svelte';
|
|
11
|
+
export { default as DataDownload } from './DataDownload.svelte';
|
|
12
|
+
export { setDownloads, useChart, useLocale, useTheme } from '../core/context.js';
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
Horizontal axis for the plot's x scale. Tick labels use the chart's locale
|
|
4
|
+
unless you pass `format`.
|
|
5
|
+
-->
|
|
6
|
+
<script lang="ts">
|
|
7
|
+
import { useChart, usePlot } from '../core/context.js';
|
|
8
|
+
import { estimateTextWidth, scaled } from '../core/scales.js';
|
|
9
|
+
import { defaultTickFormat, tickValues } from './ticks.js';
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
/** Approximate number of ticks for continuous scales. */
|
|
13
|
+
ticks?: number;
|
|
14
|
+
/** Exact tick values; overrides `ticks`. */
|
|
15
|
+
tickValues?: unknown[];
|
|
16
|
+
format?: (value: any, index: number) => string;
|
|
17
|
+
position?: 'bottom' | 'top';
|
|
18
|
+
tickSize?: number;
|
|
19
|
+
tickPadding?: number;
|
|
20
|
+
/** Draw the axis line. */
|
|
21
|
+
baseline?: boolean;
|
|
22
|
+
/** Axis title, drawn at the end of the axis. */
|
|
23
|
+
label?: string;
|
|
24
|
+
class?: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const chart = useChart();
|
|
28
|
+
const plot = usePlot();
|
|
29
|
+
|
|
30
|
+
let {
|
|
31
|
+
ticks,
|
|
32
|
+
tickValues: explicitValues,
|
|
33
|
+
format,
|
|
34
|
+
position = 'bottom',
|
|
35
|
+
tickSize: tickSizeInput,
|
|
36
|
+
tickPadding: tickPaddingInput,
|
|
37
|
+
baseline: baselineInput,
|
|
38
|
+
label,
|
|
39
|
+
class: className = ''
|
|
40
|
+
}: Props = $props();
|
|
41
|
+
|
|
42
|
+
// Theme defaults are derived (not destructuring defaults) so they follow style changes.
|
|
43
|
+
const tickSize = $derived(tickSizeInput ?? chart.theme.plot.tickSize);
|
|
44
|
+
const tickPadding = $derived(tickPaddingInput ?? chart.theme.plot.tickPadding);
|
|
45
|
+
const baseline = $derived(baselineInput ?? chart.theme.plot.axisLine);
|
|
46
|
+
const values = $derived(tickValues(plot.x, ticks ?? chart.theme.plot.ticks, explicitValues));
|
|
47
|
+
const fmt = $derived(format ?? defaultTickFormat(values, chart.locale));
|
|
48
|
+
const dir = $derived(position === 'bottom' ? 1 : -1);
|
|
49
|
+
|
|
50
|
+
// Labels that would spill past the chart edge are anchored inwards instead of centred.
|
|
51
|
+
function anchor(px: number, label: string): 'start' | 'middle' | 'end' {
|
|
52
|
+
const half = estimateTextWidth(label, chart.theme.plot.fontSize) / 2;
|
|
53
|
+
if (px + half > plot.width + plot.padding.right) return 'end';
|
|
54
|
+
if (px - half < -plot.padding.left) return 'start';
|
|
55
|
+
return 'middle';
|
|
56
|
+
}
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<g class="mz-axis mz-axis-x {className}" transform="translate(0,{position === 'bottom' ? plot.height : 0})">
|
|
60
|
+
{#if baseline}<line class="mz-axis-line" x2={plot.width} />{/if}
|
|
61
|
+
{#each values as value, i (value)}
|
|
62
|
+
{@const px = scaled(plot.x, value)}
|
|
63
|
+
{@const label = fmt(value, i)}
|
|
64
|
+
<g class="mz-tick" transform="translate({px},0)">
|
|
65
|
+
{#if tickSize > 0}<line y2={dir * tickSize} />{/if}
|
|
66
|
+
<text
|
|
67
|
+
y={dir * (tickSize + tickPadding)}
|
|
68
|
+
dy={position === 'bottom' ? '0.71em' : '0'}
|
|
69
|
+
text-anchor={anchor(px, label)}
|
|
70
|
+
>
|
|
71
|
+
{label}
|
|
72
|
+
</text>
|
|
73
|
+
</g>
|
|
74
|
+
{/each}
|
|
75
|
+
{#if label}
|
|
76
|
+
<text
|
|
77
|
+
class="mz-axis-label"
|
|
78
|
+
x={plot.width}
|
|
79
|
+
y={dir * (tickSize + tickPadding) * 3.2}
|
|
80
|
+
dy={position === 'bottom' ? '0.71em' : '0'}
|
|
81
|
+
text-anchor="end">{label}</text
|
|
82
|
+
>
|
|
83
|
+
{/if}
|
|
84
|
+
</g>
|
|
85
|
+
|
|
86
|
+
<style>
|
|
87
|
+
.mz-axis text {
|
|
88
|
+
fill: var(--mz-color-muted);
|
|
89
|
+
font-size: var(--mz-size-axis);
|
|
90
|
+
}
|
|
91
|
+
.mz-axis line {
|
|
92
|
+
stroke: var(--mz-color-axis);
|
|
93
|
+
shape-rendering: crispEdges;
|
|
94
|
+
}
|
|
95
|
+
.mz-axis-label {
|
|
96
|
+
font-family: var(--mz-font-label);
|
|
97
|
+
font-weight: var(--mz-weight-label);
|
|
98
|
+
text-transform: var(--mz-label-transform);
|
|
99
|
+
letter-spacing: var(--mz-label-tracking);
|
|
100
|
+
}
|
|
101
|
+
</style>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
/** Approximate number of ticks for continuous scales. */
|
|
3
|
+
ticks?: number;
|
|
4
|
+
/** Exact tick values; overrides `ticks`. */
|
|
5
|
+
tickValues?: unknown[];
|
|
6
|
+
format?: (value: any, index: number) => string;
|
|
7
|
+
position?: 'bottom' | 'top';
|
|
8
|
+
tickSize?: number;
|
|
9
|
+
tickPadding?: number;
|
|
10
|
+
/** Draw the axis line. */
|
|
11
|
+
baseline?: boolean;
|
|
12
|
+
/** Axis title, drawn at the end of the axis. */
|
|
13
|
+
label?: string;
|
|
14
|
+
class?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Horizontal axis for the plot's x scale. Tick labels use the chart's locale
|
|
18
|
+
* unless you pass `format`.
|
|
19
|
+
*/
|
|
20
|
+
declare const AxisX: import("svelte").Component<Props, {}, "">;
|
|
21
|
+
type AxisX = ReturnType<typeof AxisX>;
|
|
22
|
+
export default AxisX;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
Vertical axis for the plot's y scale. With `inside`, labels sit just above
|
|
4
|
+
the gridlines inside the plot area, which saves left padding on small screens.
|
|
5
|
+
-->
|
|
6
|
+
<script lang="ts">
|
|
7
|
+
import { useChart, usePlot } from '../core/context.js';
|
|
8
|
+
import { scaled } from '../core/scales.js';
|
|
9
|
+
import { defaultTickFormat, tickValues } from './ticks.js';
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
ticks?: number;
|
|
13
|
+
tickValues?: unknown[];
|
|
14
|
+
format?: (value: any, index: number) => string;
|
|
15
|
+
position?: 'left' | 'right';
|
|
16
|
+
/** Put labels above the gridlines, inside the plot area. */
|
|
17
|
+
inside?: boolean;
|
|
18
|
+
tickSize?: number;
|
|
19
|
+
tickPadding?: number;
|
|
20
|
+
baseline?: boolean;
|
|
21
|
+
/** Axis title, drawn above the axis. */
|
|
22
|
+
label?: string;
|
|
23
|
+
class?: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const chart = useChart();
|
|
27
|
+
const plot = usePlot();
|
|
28
|
+
|
|
29
|
+
let {
|
|
30
|
+
ticks,
|
|
31
|
+
tickValues: explicitValues,
|
|
32
|
+
format,
|
|
33
|
+
position = 'left',
|
|
34
|
+
inside = false,
|
|
35
|
+
tickSize: tickSizeInput,
|
|
36
|
+
tickPadding: tickPaddingInput,
|
|
37
|
+
baseline: baselineInput,
|
|
38
|
+
label,
|
|
39
|
+
class: className = ''
|
|
40
|
+
}: Props = $props();
|
|
41
|
+
|
|
42
|
+
// Theme defaults are derived (not destructuring defaults) so they follow style changes.
|
|
43
|
+
const tickSize = $derived(tickSizeInput ?? chart.theme.plot.tickSize);
|
|
44
|
+
const tickPadding = $derived(tickPaddingInput ?? chart.theme.plot.tickPadding);
|
|
45
|
+
const baseline = $derived(baselineInput ?? chart.theme.plot.axisLine);
|
|
46
|
+
const values = $derived(tickValues(plot.y, ticks ?? chart.theme.plot.ticks, explicitValues));
|
|
47
|
+
const fmt = $derived(format ?? defaultTickFormat(values, chart.locale));
|
|
48
|
+
const dir = $derived(position === 'left' ? -1 : 1);
|
|
49
|
+
const anchor = $derived(inside ? (position === 'left' ? 'start' : 'end') : position === 'left' ? 'end' : 'start');
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
<g class="mz-axis mz-axis-y {className}" transform="translate({position === 'left' ? 0 : plot.width},0)">
|
|
53
|
+
{#if baseline}<line class="mz-axis-line" y2={plot.height} />{/if}
|
|
54
|
+
{#each values as value, i (value)}
|
|
55
|
+
<g class="mz-tick" transform="translate(0,{scaled(plot.y, value)})">
|
|
56
|
+
{#if tickSize > 0 && !inside}<line x2={dir * tickSize} />{/if}
|
|
57
|
+
{#if inside}
|
|
58
|
+
<text x={0} dy="-0.35em" text-anchor={anchor}>{fmt(value, i)}</text>
|
|
59
|
+
{:else}
|
|
60
|
+
<text x={dir * (tickSize + tickPadding)} dy="0.32em" text-anchor={anchor}>{fmt(value, i)}</text>
|
|
61
|
+
{/if}
|
|
62
|
+
</g>
|
|
63
|
+
{/each}
|
|
64
|
+
{#if label}
|
|
65
|
+
<text class="mz-axis-label" y={-12} text-anchor={position === 'left' ? 'start' : 'end'}>{label}</text>
|
|
66
|
+
{/if}
|
|
67
|
+
</g>
|
|
68
|
+
|
|
69
|
+
<style>
|
|
70
|
+
.mz-axis text {
|
|
71
|
+
fill: var(--mz-color-muted);
|
|
72
|
+
font-size: var(--mz-size-axis);
|
|
73
|
+
}
|
|
74
|
+
.mz-axis line {
|
|
75
|
+
stroke: var(--mz-color-axis);
|
|
76
|
+
shape-rendering: crispEdges;
|
|
77
|
+
}
|
|
78
|
+
.mz-axis-label {
|
|
79
|
+
font-family: var(--mz-font-label);
|
|
80
|
+
font-weight: var(--mz-weight-label);
|
|
81
|
+
text-transform: var(--mz-label-transform);
|
|
82
|
+
letter-spacing: var(--mz-label-tracking);
|
|
83
|
+
}
|
|
84
|
+
</style>
|