@rokkit/chart 1.1.18 → 1.1.19
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/dist/AnimatedPlot.svelte.d.ts +35 -0
- package/dist/Chart.svelte.d.ts +21 -0
- package/dist/ChartExporter.svelte.d.ts +22 -0
- package/dist/ChartLegend.svelte.d.ts +30 -0
- package/dist/ChartProvider.svelte.d.ts +10 -0
- package/dist/FacetPlot/Panel.svelte.d.ts +22 -0
- package/dist/FacetPlot.svelte.d.ts +32 -0
- package/dist/Plot/Arc.svelte.d.ts +18 -0
- package/dist/Plot/Area.svelte.d.ts +14 -0
- package/dist/Plot/Axis.svelte.d.ts +13 -0
- package/dist/Plot/Bar.svelte.d.ts +11 -0
- package/dist/Plot/Grid.svelte.d.ts +3 -0
- package/dist/Plot/Legend.svelte.d.ts +6 -0
- package/dist/Plot/Line.svelte.d.ts +13 -0
- package/dist/Plot/Point.svelte.d.ts +13 -0
- package/dist/Plot/Root.svelte.d.ts +21 -0
- package/dist/Plot/Timeline.svelte.d.ts +13 -0
- package/dist/Plot/Tooltip.svelte.d.ts +7 -0
- package/dist/Plot.svelte.d.ts +34 -0
- package/dist/PlotState.svelte.d.ts +0 -3
- package/dist/Sparkline.svelte.d.ts +16 -0
- package/dist/Symbol.svelte.d.ts +12 -0
- package/dist/Texture.svelte.d.ts +12 -0
- package/dist/charts/AreaChart.svelte.d.ts +25 -0
- package/dist/charts/BarChart.svelte.d.ts +26 -0
- package/dist/charts/BoxPlot.svelte.d.ts +18 -0
- package/dist/charts/BubbleChart.svelte.d.ts +23 -0
- package/dist/charts/LineChart.svelte.d.ts +26 -0
- package/dist/charts/PieChart.svelte.d.ts +19 -0
- package/dist/charts/ScatterPlot.svelte.d.ts +29 -0
- package/dist/charts/ViolinPlot.svelte.d.ts +18 -0
- package/dist/crossfilter/CrossFilter.svelte.d.ts +12 -0
- package/dist/crossfilter/FilterBar.svelte.d.ts +12 -0
- package/dist/crossfilter/FilterHistogram.svelte.d.ts +19 -0
- package/dist/crossfilter/FilterSlider.svelte.d.ts +15 -0
- package/dist/elements/Bar.svelte.d.ts +17 -0
- package/dist/elements/ColorRamp.svelte.d.ts +17 -0
- package/dist/elements/ContinuousLegend.svelte.d.ts +18 -0
- package/dist/elements/DefinePatterns.svelte.d.ts +21 -0
- package/dist/elements/DiscreteLegend.svelte.d.ts +17 -0
- package/dist/elements/Label.svelte.d.ts +11 -0
- package/dist/elements/SymbolGrid.svelte.d.ts +8 -0
- package/dist/examples/BarChartExample.svelte.d.ts +18 -0
- package/dist/geoms/Arc.svelte.d.ts +20 -0
- package/dist/geoms/Area.svelte.d.ts +16 -0
- package/dist/geoms/Bar.svelte.d.ts +23 -0
- package/dist/geoms/Box.svelte.d.ts +12 -0
- package/dist/geoms/Candlestick.svelte.d.ts +20 -0
- package/dist/geoms/Heatmap.svelte.d.ts +13 -0
- package/dist/geoms/Hexbin.svelte.d.ts +13 -0
- package/dist/geoms/LabelPill.svelte.d.ts +9 -0
- package/dist/geoms/Line.svelte.d.ts +24 -0
- package/dist/geoms/Point.svelte.d.ts +30 -0
- package/dist/geoms/Ribbon.svelte.d.ts +16 -0
- package/dist/geoms/Violin.svelte.d.ts +12 -0
- package/dist/geoms/Waterfall.svelte.d.ts +18 -0
- package/dist/geoms/lib/areas.d.ts +5 -3
- package/dist/lib/brewing/brewer.svelte.d.ts +24 -15
- package/dist/lib/brewing/marks/arcs.d.ts +16 -6
- package/dist/lib/brewing/marks/areas.d.ts +2 -2
- package/dist/lib/brewing/marks/boxes.d.ts +3 -3
- package/dist/lib/brewing/marks/lines.d.ts +6 -6
- package/dist/lib/brewing/marks/points.d.ts +13 -12
- package/dist/lib/brewing/marks/violins.d.ts +3 -3
- package/dist/lib/brewing/scales.d.ts +3 -3
- package/dist/lib/chart.d.ts +2 -2
- package/dist/lib/keyboard-nav.d.ts +1 -1
- package/dist/lib/plot/facet.d.ts +2 -2
- package/dist/lib/plot/frames.d.ts +9 -9
- package/dist/lib/plot/scales.d.ts +3 -3
- package/dist/lib/plot/types.d.ts +7 -4
- package/dist/lib/scales.svelte.d.ts +2 -2
- package/dist/lib/utils.d.ts +7 -1
- package/dist/lib/xscale.d.ts +1 -1
- package/dist/patterns/DefinePatterns.svelte.d.ts +7 -0
- package/dist/patterns/PatternDef.svelte.d.ts +11 -0
- package/dist/spec/chart-spec.d.ts +22 -0
- package/dist/symbols/RoundedSquare.svelte.d.ts +11 -0
- package/dist/symbols/Shape.svelte.d.ts +18 -0
- package/dist/symbols/constants/index.d.ts +1 -1
- package/dist/symbols/index.d.ts +2 -2
- package/dist/symbols/outline.svelte.d.ts +18 -0
- package/dist/symbols/solid.svelte.d.ts +18 -0
- package/package.json +22 -3
- package/src/AnimatedPlot.svelte +49 -43
- package/src/Chart.svelte +34 -22
- package/src/ChartExporter.svelte +19 -16
- package/src/ChartLegend.svelte +24 -20
- package/src/ChartProvider.svelte +10 -2
- package/src/FacetPlot/Panel.svelte +23 -3
- package/src/FacetPlot.svelte +29 -26
- package/src/Plot/Arc.svelte +3 -2
- package/src/Plot/Area.svelte +30 -8
- package/src/Plot/Axis.svelte +26 -45
- package/src/Plot/Bar.svelte +20 -5
- package/src/Plot/Grid.svelte +5 -4
- package/src/Plot/Legend.svelte +8 -4
- package/src/Plot/Line.svelte +24 -7
- package/src/Plot/Point.svelte +24 -6
- package/src/Plot/Root.svelte +17 -2
- package/src/Plot/Timeline.svelte +13 -14
- package/src/Plot/Tooltip.svelte +12 -6
- package/src/Plot.svelte +41 -32
- package/src/PlotState.svelte.js +6 -2
- package/src/Sparkline.svelte +22 -8
- package/src/Symbol.svelte +15 -5
- package/src/Texture.svelte +12 -2
- package/src/charts/AreaChart.svelte +26 -3
- package/src/charts/BarChart.svelte +27 -3
- package/src/charts/BoxPlot.svelte +19 -3
- package/src/charts/BubbleChart.svelte +24 -3
- package/src/charts/LineChart.svelte +27 -3
- package/src/charts/PieChart.svelte +20 -3
- package/src/charts/ScatterPlot.svelte +27 -3
- package/src/charts/ViolinPlot.svelte +19 -3
- package/src/crossfilter/CrossFilter.svelte +13 -10
- package/src/crossfilter/FilterBar.svelte +14 -3
- package/src/crossfilter/FilterHistogram.svelte +49 -24
- package/src/crossfilter/FilterSlider.svelte +16 -5
- package/src/elements/Bar.svelte +16 -2
- package/src/elements/ColorRamp.svelte +28 -4
- package/src/elements/ContinuousLegend.svelte +20 -3
- package/src/elements/DefinePatterns.svelte +23 -7
- package/src/elements/DiscreteLegend.svelte +18 -2
- package/src/elements/Label.svelte +11 -2
- package/src/elements/SymbolGrid.svelte +13 -4
- package/src/examples/BarChartExample.svelte +12 -15
- package/src/geoms/Arc.svelte +18 -5
- package/src/geoms/Area.svelte +38 -20
- package/src/geoms/Bar.svelte +40 -23
- package/src/geoms/Box.svelte +13 -4
- package/src/geoms/Candlestick.svelte +27 -7
- package/src/geoms/Heatmap.svelte +20 -9
- package/src/geoms/Hexbin.svelte +35 -13
- package/src/geoms/LabelPill.svelte +9 -3
- package/src/geoms/Line.svelte +27 -10
- package/src/geoms/Point.svelte +33 -13
- package/src/geoms/Ribbon.svelte +26 -8
- package/src/geoms/Violin.svelte +13 -4
- package/src/geoms/Waterfall.svelte +32 -12
- package/src/geoms/lib/areas.js +2 -2
- package/src/lib/brewing/marks/arcs.js +3 -2
- package/src/lib/brewing/marks/boxes.js +1 -1
- package/src/lib/brewing/marks/lines.js +2 -2
- package/src/lib/brewing/marks/points.js +3 -2
- package/src/lib/brewing/marks/violins.js +1 -1
- package/src/lib/plot/facet.js +1 -1
- package/src/lib/plot/frames.js +4 -4
- package/src/lib/plot/types.js +6 -3
- package/src/lib/utils.js +7 -1
- package/src/patterns/DefinePatterns.svelte +9 -4
- package/src/patterns/PatternDef.svelte +11 -3
- package/src/symbols/RoundedSquare.svelte +15 -4
- package/src/symbols/Shape.svelte +21 -3
- package/src/symbols/outline.svelte +2 -0
- package/src/symbols/solid.svelte +2 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { GeomSpec, PlotHelpers } from './lib/plot/types.js';
|
|
3
|
+
type Row = Record<string, unknown>;
|
|
4
|
+
type Animate = {
|
|
5
|
+
by: string;
|
|
6
|
+
duration?: number;
|
|
7
|
+
loop?: boolean;
|
|
8
|
+
};
|
|
9
|
+
type Props = {
|
|
10
|
+
data?: Row[];
|
|
11
|
+
animate: Animate;
|
|
12
|
+
x?: string;
|
|
13
|
+
y?: string;
|
|
14
|
+
color?: string;
|
|
15
|
+
fill?: string;
|
|
16
|
+
pattern?: string;
|
|
17
|
+
symbol?: string;
|
|
18
|
+
geom?: string;
|
|
19
|
+
stat?: string;
|
|
20
|
+
geoms?: GeomSpec[];
|
|
21
|
+
helpers?: PlotHelpers;
|
|
22
|
+
width?: number;
|
|
23
|
+
height?: number;
|
|
24
|
+
mode?: 'light' | 'dark';
|
|
25
|
+
grid?: boolean;
|
|
26
|
+
legend?: boolean;
|
|
27
|
+
tween?: boolean;
|
|
28
|
+
sorted?: boolean;
|
|
29
|
+
dynamicDomain?: boolean;
|
|
30
|
+
label?: boolean | string | ((data: Row) => string);
|
|
31
|
+
children?: Snippet;
|
|
32
|
+
};
|
|
33
|
+
declare const AnimatedPlot: import("svelte").Component<Props, {}, "">;
|
|
34
|
+
type AnimatedPlot = ReturnType<typeof AnimatedPlot>;
|
|
35
|
+
export default AnimatedPlot;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { ChartSpec } from './spec/chart-spec.js';
|
|
3
|
+
type Props = {
|
|
4
|
+
spec?: ChartSpec;
|
|
5
|
+
data?: Record<string, unknown>[];
|
|
6
|
+
x?: string;
|
|
7
|
+
y?: string;
|
|
8
|
+
color?: string;
|
|
9
|
+
pattern?: string;
|
|
10
|
+
fill?: string;
|
|
11
|
+
size?: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
symbol?: string;
|
|
14
|
+
width?: number;
|
|
15
|
+
height?: number;
|
|
16
|
+
mode?: 'light' | 'dark';
|
|
17
|
+
children?: Snippet;
|
|
18
|
+
};
|
|
19
|
+
declare const Chart: import("svelte").Component<Props, {}, "">;
|
|
20
|
+
type Chart = ReturnType<typeof Chart>;
|
|
21
|
+
export default Chart;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
/**
|
|
3
|
+
* ChartExporter — wraps a chart and provides export actions for SVG and PNG.
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* <ChartExporter bind:this={exporter}>
|
|
7
|
+
* <BarChart bind:el={chartEl} ... />
|
|
8
|
+
* </ChartExporter>
|
|
9
|
+
* <button onclick={() => exporter.exportSVG()}>SVG</button>
|
|
10
|
+
* <button onclick={() => exporter.exportPNG()}>PNG</button>
|
|
11
|
+
*/
|
|
12
|
+
type Props = {
|
|
13
|
+
children?: Snippet;
|
|
14
|
+
filename?: string;
|
|
15
|
+
scale?: number;
|
|
16
|
+
};
|
|
17
|
+
declare const ChartExporter: import("svelte").Component<Props, {
|
|
18
|
+
exportSVG: () => void;
|
|
19
|
+
exportPNG: (scaleFactor?: number) => void;
|
|
20
|
+
}, "">;
|
|
21
|
+
type ChartExporter = ReturnType<typeof ChartExporter>;
|
|
22
|
+
export default ChartExporter;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
type LegendItem = {
|
|
2
|
+
key: string;
|
|
3
|
+
label: string;
|
|
4
|
+
fill?: string;
|
|
5
|
+
stroke?: string;
|
|
6
|
+
patternId?: string;
|
|
7
|
+
shape?: string;
|
|
8
|
+
};
|
|
9
|
+
type LegendGroup = {
|
|
10
|
+
type?: 'color' | 'pattern' | 'symbol';
|
|
11
|
+
label?: string;
|
|
12
|
+
items: LegendItem[];
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Standalone chart legend — HTML-based, usable outside of Plot context.
|
|
16
|
+
* Accepts `groups` from a chart's brewer or from multiple charts for shared legends.
|
|
17
|
+
*/
|
|
18
|
+
type Props = {
|
|
19
|
+
groups?: LegendGroup[];
|
|
20
|
+
orientation?: 'horizontal' | 'vertical' | 'wrap';
|
|
21
|
+
gradient?: {
|
|
22
|
+
style: string;
|
|
23
|
+
min: string;
|
|
24
|
+
max: string;
|
|
25
|
+
} | null;
|
|
26
|
+
swatchStyle?: 'fill' | 'line' | 'point';
|
|
27
|
+
};
|
|
28
|
+
declare const ChartLegend: import("svelte").Component<Props, {}, "">;
|
|
29
|
+
type ChartLegend = ReturnType<typeof ChartLegend>;
|
|
30
|
+
export default ChartLegend;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import { createChartPreset } from './lib/preset.js';
|
|
3
|
+
type Preset = ReturnType<typeof createChartPreset>;
|
|
4
|
+
type Props = {
|
|
5
|
+
preset?: Preset;
|
|
6
|
+
children?: Snippet;
|
|
7
|
+
};
|
|
8
|
+
declare const ChartProvider: import("svelte").Component<Props, {}, "">;
|
|
9
|
+
type ChartProvider = ReturnType<typeof ChartProvider>;
|
|
10
|
+
export default ChartProvider;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { GeomSpec, PlotHelpers } from '../lib/plot/types.js';
|
|
3
|
+
type Props = {
|
|
4
|
+
data?: Record<string, unknown>[];
|
|
5
|
+
x?: string;
|
|
6
|
+
y?: string;
|
|
7
|
+
color?: string;
|
|
8
|
+
geoms?: GeomSpec[];
|
|
9
|
+
helpers?: PlotHelpers;
|
|
10
|
+
width?: number;
|
|
11
|
+
height?: number;
|
|
12
|
+
mode?: 'light' | 'dark';
|
|
13
|
+
grid?: boolean;
|
|
14
|
+
legend?: boolean;
|
|
15
|
+
xDomain?: unknown[];
|
|
16
|
+
yDomain?: [number, number];
|
|
17
|
+
colorDomain?: unknown[];
|
|
18
|
+
children?: Snippet;
|
|
19
|
+
};
|
|
20
|
+
declare const Panel: import("svelte").Component<Props, {}, "">;
|
|
21
|
+
type Panel = ReturnType<typeof Panel>;
|
|
22
|
+
export default Panel;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { GeomSpec, PlotHelpers } from './lib/plot/types.js';
|
|
3
|
+
type Facet = {
|
|
4
|
+
by: string;
|
|
5
|
+
cols?: number;
|
|
6
|
+
scales?: 'fixed' | 'free' | 'free_x' | 'free_y';
|
|
7
|
+
};
|
|
8
|
+
type Props = {
|
|
9
|
+
data?: Record<string, unknown>[];
|
|
10
|
+
facet: Facet;
|
|
11
|
+
x?: string;
|
|
12
|
+
y?: string;
|
|
13
|
+
color?: string;
|
|
14
|
+
fill?: string;
|
|
15
|
+
pattern?: string;
|
|
16
|
+
symbol?: string;
|
|
17
|
+
geom?: string;
|
|
18
|
+
stat?: string;
|
|
19
|
+
geoms?: GeomSpec[];
|
|
20
|
+
helpers?: PlotHelpers;
|
|
21
|
+
panelWidth?: number;
|
|
22
|
+
panelHeight?: number;
|
|
23
|
+
width?: number;
|
|
24
|
+
height?: number;
|
|
25
|
+
mode?: 'light' | 'dark';
|
|
26
|
+
grid?: boolean;
|
|
27
|
+
legend?: boolean;
|
|
28
|
+
children?: Snippet;
|
|
29
|
+
};
|
|
30
|
+
declare const FacetPlot: import("svelte").Component<Props, {}, "">;
|
|
31
|
+
type FacetPlot = ReturnType<typeof FacetPlot>;
|
|
32
|
+
export default FacetPlot;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const Arc: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
}, {}, {}, string>;
|
|
17
|
+
type Arc = InstanceType<typeof Arc>;
|
|
18
|
+
export default Arc;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type CurveFactory } from 'd3-shape';
|
|
2
|
+
type Datum = Record<string, unknown> | number;
|
|
3
|
+
type Props = {
|
|
4
|
+
data?: Datum[];
|
|
5
|
+
x?: string;
|
|
6
|
+
y?: string;
|
|
7
|
+
y0?: string;
|
|
8
|
+
fill?: string;
|
|
9
|
+
opacity?: number;
|
|
10
|
+
curve?: CurveFactory;
|
|
11
|
+
};
|
|
12
|
+
declare const Area: import("svelte").Component<Props, {}, "">;
|
|
13
|
+
type Area = ReturnType<typeof Area>;
|
|
14
|
+
export default Area;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
type?: 'x' | 'y';
|
|
3
|
+
label?: string;
|
|
4
|
+
format?: (v: unknown) => string;
|
|
5
|
+
ticks?: number;
|
|
6
|
+
minorTicks?: boolean;
|
|
7
|
+
showLine?: boolean;
|
|
8
|
+
showTicks?: boolean;
|
|
9
|
+
showLabels?: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare const Axis: import("svelte").Component<Props, {}, "">;
|
|
12
|
+
type Axis = ReturnType<typeof Axis>;
|
|
13
|
+
export default Axis;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type Datum = Record<string, unknown> | number;
|
|
2
|
+
type Props = {
|
|
3
|
+
data?: Datum[];
|
|
4
|
+
x?: string;
|
|
5
|
+
y?: string;
|
|
6
|
+
fill?: string;
|
|
7
|
+
opacity?: number;
|
|
8
|
+
};
|
|
9
|
+
declare const Bar: import("svelte").Component<Props, {}, "">;
|
|
10
|
+
type Bar = ReturnType<typeof Bar>;
|
|
11
|
+
export default Bar;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type CurveFactory } from 'd3-shape';
|
|
2
|
+
type Datum = Record<string, unknown> | number;
|
|
3
|
+
type Props = {
|
|
4
|
+
data?: Datum[];
|
|
5
|
+
x?: string;
|
|
6
|
+
y?: string;
|
|
7
|
+
stroke?: string;
|
|
8
|
+
strokeWidth?: number;
|
|
9
|
+
curve?: CurveFactory;
|
|
10
|
+
};
|
|
11
|
+
declare const Line: import("svelte").Component<Props, {}, "">;
|
|
12
|
+
type Line = ReturnType<typeof Line>;
|
|
13
|
+
export default Line;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type Datum = Record<string, unknown> | number;
|
|
2
|
+
type Props = {
|
|
3
|
+
data?: Datum[];
|
|
4
|
+
x?: string;
|
|
5
|
+
y?: string;
|
|
6
|
+
r?: number;
|
|
7
|
+
fill?: string;
|
|
8
|
+
stroke?: string;
|
|
9
|
+
strokeWidth?: number;
|
|
10
|
+
};
|
|
11
|
+
declare const Point: import("svelte").Component<Props, {}, "">;
|
|
12
|
+
type Point = ReturnType<typeof Point>;
|
|
13
|
+
export default Point;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
type Margin = {
|
|
3
|
+
top?: number;
|
|
4
|
+
right?: number;
|
|
5
|
+
bottom?: number;
|
|
6
|
+
left?: number;
|
|
7
|
+
};
|
|
8
|
+
type Props = {
|
|
9
|
+
data?: Record<string, unknown>[];
|
|
10
|
+
x?: string;
|
|
11
|
+
y?: string;
|
|
12
|
+
color?: string;
|
|
13
|
+
width?: number;
|
|
14
|
+
height?: number;
|
|
15
|
+
margin?: Margin;
|
|
16
|
+
mode?: 'light' | 'dark';
|
|
17
|
+
children?: Snippet;
|
|
18
|
+
};
|
|
19
|
+
declare const Root: import("svelte").Component<Props, {}, "">;
|
|
20
|
+
type Root = ReturnType<typeof Root>;
|
|
21
|
+
export default Root;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
frameKeys?: unknown[];
|
|
3
|
+
currentIndex?: number;
|
|
4
|
+
playing?: boolean;
|
|
5
|
+
speed?: number;
|
|
6
|
+
onplay?: () => void;
|
|
7
|
+
onpause?: () => void;
|
|
8
|
+
onscrub?: (index: number) => void;
|
|
9
|
+
onspeed?: (speed: number) => void;
|
|
10
|
+
};
|
|
11
|
+
declare const Timeline: import("svelte").Component<Props, {}, "">;
|
|
12
|
+
type Timeline = ReturnType<typeof Timeline>;
|
|
13
|
+
export default Timeline;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { PlotSpec, PlotHelpers } from './lib/plot/types.js';
|
|
3
|
+
type Row = Record<string, unknown>;
|
|
4
|
+
type Margin = {
|
|
5
|
+
top: number;
|
|
6
|
+
right: number;
|
|
7
|
+
bottom: number;
|
|
8
|
+
left: number;
|
|
9
|
+
};
|
|
10
|
+
type Props = {
|
|
11
|
+
data?: Row[];
|
|
12
|
+
spec?: PlotSpec;
|
|
13
|
+
helpers?: PlotHelpers;
|
|
14
|
+
width?: number;
|
|
15
|
+
height?: number;
|
|
16
|
+
mode?: 'light' | 'dark';
|
|
17
|
+
grid?: boolean;
|
|
18
|
+
axes?: boolean;
|
|
19
|
+
margin?: Margin;
|
|
20
|
+
legend?: boolean;
|
|
21
|
+
title?: string;
|
|
22
|
+
summary?: string;
|
|
23
|
+
tooltip?: boolean | ((data: Row) => string);
|
|
24
|
+
zoom?: boolean;
|
|
25
|
+
xFormat?: (v: unknown) => string;
|
|
26
|
+
yFormat?: (v: unknown) => string;
|
|
27
|
+
xTicks?: number;
|
|
28
|
+
yTicks?: number;
|
|
29
|
+
minorTicks?: boolean;
|
|
30
|
+
children?: Snippet;
|
|
31
|
+
};
|
|
32
|
+
declare const Plot: import("svelte").Component<Props, {}, "">;
|
|
33
|
+
type Plot = ReturnType<typeof Plot>;
|
|
34
|
+
export default Plot;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PATTERNS } from './patterns/patterns.js';
|
|
2
|
+
type Props = {
|
|
3
|
+
data?: number[] | Record<string, unknown>[];
|
|
4
|
+
field?: string;
|
|
5
|
+
type?: 'line' | 'area' | 'bar';
|
|
6
|
+
curve?: 'linear' | 'smooth';
|
|
7
|
+
color?: string;
|
|
8
|
+
pattern?: keyof typeof PATTERNS;
|
|
9
|
+
width?: number;
|
|
10
|
+
height?: number;
|
|
11
|
+
min?: number;
|
|
12
|
+
max?: number;
|
|
13
|
+
};
|
|
14
|
+
declare const Sparkline: import("svelte").Component<Props, {}, "">;
|
|
15
|
+
type Sparkline = ReturnType<typeof Sparkline>;
|
|
16
|
+
export default Sparkline;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SVGAttributes } from 'svelte/elements';
|
|
2
|
+
type Props = {
|
|
3
|
+
x?: number;
|
|
4
|
+
y?: number;
|
|
5
|
+
size?: number;
|
|
6
|
+
fill?: string;
|
|
7
|
+
stroke?: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
} & Omit<SVGAttributes<SVGElement>, 'x' | 'y' | 'fill' | 'stroke'>;
|
|
10
|
+
declare const Symbol: import("svelte").Component<Props, {}, "">;
|
|
11
|
+
type Symbol = ReturnType<typeof Symbol>;
|
|
12
|
+
export default Symbol;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
id?: string;
|
|
3
|
+
path?: string;
|
|
4
|
+
fill?: string;
|
|
5
|
+
stroke?: string;
|
|
6
|
+
thickness?: number;
|
|
7
|
+
patternUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
|
|
8
|
+
size?: number;
|
|
9
|
+
};
|
|
10
|
+
declare const Texture: import("svelte").Component<Props, {}, "">;
|
|
11
|
+
type Texture = ReturnType<typeof Texture>;
|
|
12
|
+
export default Texture;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type Row = Record<string, unknown>;
|
|
2
|
+
type Format = (v: unknown) => string;
|
|
3
|
+
type Props = {
|
|
4
|
+
data?: Row[];
|
|
5
|
+
x?: string;
|
|
6
|
+
y?: string;
|
|
7
|
+
fill?: string;
|
|
8
|
+
stat?: string;
|
|
9
|
+
curve?: 'linear' | 'smooth' | 'step';
|
|
10
|
+
pattern?: string;
|
|
11
|
+
stack?: boolean;
|
|
12
|
+
width?: number;
|
|
13
|
+
height?: number;
|
|
14
|
+
mode?: 'light' | 'dark';
|
|
15
|
+
grid?: boolean;
|
|
16
|
+
legend?: boolean;
|
|
17
|
+
xFormat?: Format;
|
|
18
|
+
yFormat?: Format;
|
|
19
|
+
xTicks?: number;
|
|
20
|
+
yTicks?: number;
|
|
21
|
+
minorTicks?: boolean;
|
|
22
|
+
};
|
|
23
|
+
declare const AreaChart: import("svelte").Component<Props, {}, "">;
|
|
24
|
+
type AreaChart = ReturnType<typeof AreaChart>;
|
|
25
|
+
export default AreaChart;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
type Row = Record<string, unknown>;
|
|
2
|
+
type Format = (v: unknown) => string;
|
|
3
|
+
type Props = {
|
|
4
|
+
data?: Row[];
|
|
5
|
+
x?: string;
|
|
6
|
+
y?: string;
|
|
7
|
+
fill?: string;
|
|
8
|
+
pattern?: string;
|
|
9
|
+
width?: number;
|
|
10
|
+
height?: number;
|
|
11
|
+
mode?: 'light' | 'dark';
|
|
12
|
+
grid?: boolean;
|
|
13
|
+
legend?: boolean;
|
|
14
|
+
stat?: string;
|
|
15
|
+
stack?: boolean;
|
|
16
|
+
label?: boolean | string | ((data: Row) => unknown);
|
|
17
|
+
tooltip?: boolean | ((data: Row) => string);
|
|
18
|
+
xFormat?: Format;
|
|
19
|
+
yFormat?: Format;
|
|
20
|
+
xTicks?: number;
|
|
21
|
+
yTicks?: number;
|
|
22
|
+
minorTicks?: boolean;
|
|
23
|
+
};
|
|
24
|
+
declare const BarChart: import("svelte").Component<Props, {}, "">;
|
|
25
|
+
type BarChart = ReturnType<typeof BarChart>;
|
|
26
|
+
export default BarChart;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type Row = Record<string, unknown>;
|
|
2
|
+
type Props = {
|
|
3
|
+
data?: Row[];
|
|
4
|
+
x?: string;
|
|
5
|
+
y?: string;
|
|
6
|
+
fill?: string;
|
|
7
|
+
width?: number;
|
|
8
|
+
height?: number;
|
|
9
|
+
mode?: 'light' | 'dark';
|
|
10
|
+
grid?: boolean;
|
|
11
|
+
legend?: boolean;
|
|
12
|
+
yFormat?: (v: unknown) => string;
|
|
13
|
+
yTicks?: number;
|
|
14
|
+
minorTicks?: boolean;
|
|
15
|
+
};
|
|
16
|
+
declare const BoxPlot: import("svelte").Component<Props, {}, "">;
|
|
17
|
+
type BoxPlot = ReturnType<typeof BoxPlot>;
|
|
18
|
+
export default BoxPlot;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type Row = Record<string, unknown>;
|
|
2
|
+
type Format = (v: unknown) => string;
|
|
3
|
+
type Props = {
|
|
4
|
+
data?: Row[];
|
|
5
|
+
x?: string;
|
|
6
|
+
y?: string;
|
|
7
|
+
color?: string;
|
|
8
|
+
symbol?: string;
|
|
9
|
+
size?: string;
|
|
10
|
+
width?: number;
|
|
11
|
+
height?: number;
|
|
12
|
+
mode?: 'light' | 'dark';
|
|
13
|
+
grid?: boolean;
|
|
14
|
+
legend?: boolean;
|
|
15
|
+
xFormat?: Format;
|
|
16
|
+
yFormat?: Format;
|
|
17
|
+
xTicks?: number;
|
|
18
|
+
yTicks?: number;
|
|
19
|
+
minorTicks?: boolean;
|
|
20
|
+
};
|
|
21
|
+
declare const BubbleChart: import("svelte").Component<Props, {}, "">;
|
|
22
|
+
type BubbleChart = ReturnType<typeof BubbleChart>;
|
|
23
|
+
export default BubbleChart;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
type Row = Record<string, unknown>;
|
|
2
|
+
type Format = (v: unknown) => string;
|
|
3
|
+
type Props = {
|
|
4
|
+
data?: Row[];
|
|
5
|
+
x?: string;
|
|
6
|
+
y?: string;
|
|
7
|
+
color?: string;
|
|
8
|
+
stat?: string;
|
|
9
|
+
symbol?: string;
|
|
10
|
+
curve?: 'linear' | 'smooth' | 'step';
|
|
11
|
+
label?: boolean | string | ((data: Row) => unknown);
|
|
12
|
+
tooltip?: boolean | ((data: Row) => string);
|
|
13
|
+
width?: number;
|
|
14
|
+
height?: number;
|
|
15
|
+
mode?: 'light' | 'dark';
|
|
16
|
+
grid?: boolean;
|
|
17
|
+
legend?: boolean;
|
|
18
|
+
xFormat?: Format;
|
|
19
|
+
yFormat?: Format;
|
|
20
|
+
xTicks?: number;
|
|
21
|
+
yTicks?: number;
|
|
22
|
+
minorTicks?: boolean;
|
|
23
|
+
};
|
|
24
|
+
declare const LineChart: import("svelte").Component<Props, {}, "">;
|
|
25
|
+
type LineChart = ReturnType<typeof LineChart>;
|
|
26
|
+
export default LineChart;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type Row = Record<string, unknown>;
|
|
2
|
+
type Props = {
|
|
3
|
+
data?: Row[];
|
|
4
|
+
label?: string;
|
|
5
|
+
y?: string;
|
|
6
|
+
fill?: string;
|
|
7
|
+
pattern?: string;
|
|
8
|
+
innerRadius?: number;
|
|
9
|
+
labelFn?: (data: Row) => string;
|
|
10
|
+
tooltip?: boolean | ((data: Row) => string);
|
|
11
|
+
width?: number;
|
|
12
|
+
height?: number;
|
|
13
|
+
mode?: 'light' | 'dark';
|
|
14
|
+
legend?: boolean;
|
|
15
|
+
stat?: string;
|
|
16
|
+
};
|
|
17
|
+
declare const PieChart: import("svelte").Component<Props, {}, "">;
|
|
18
|
+
type PieChart = ReturnType<typeof PieChart>;
|
|
19
|
+
export default PieChart;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
type Row = Record<string, unknown>;
|
|
2
|
+
type Format = (v: unknown) => string;
|
|
3
|
+
type Props = {
|
|
4
|
+
data?: Row[];
|
|
5
|
+
x?: string;
|
|
6
|
+
y?: string;
|
|
7
|
+
color?: string;
|
|
8
|
+
symbol?: string;
|
|
9
|
+
size?: string;
|
|
10
|
+
label?: boolean | string | ((data: Row) => unknown);
|
|
11
|
+
tooltip?: boolean | ((data: Row) => string);
|
|
12
|
+
width?: number;
|
|
13
|
+
height?: number;
|
|
14
|
+
mode?: 'light' | 'dark';
|
|
15
|
+
grid?: boolean;
|
|
16
|
+
legend?: boolean;
|
|
17
|
+
jitter?: {
|
|
18
|
+
width?: number;
|
|
19
|
+
height?: number;
|
|
20
|
+
} | null;
|
|
21
|
+
xFormat?: Format;
|
|
22
|
+
yFormat?: Format;
|
|
23
|
+
xTicks?: number;
|
|
24
|
+
yTicks?: number;
|
|
25
|
+
minorTicks?: boolean;
|
|
26
|
+
};
|
|
27
|
+
declare const ScatterPlot: import("svelte").Component<Props, {}, "">;
|
|
28
|
+
type ScatterPlot = ReturnType<typeof ScatterPlot>;
|
|
29
|
+
export default ScatterPlot;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type Row = Record<string, unknown>;
|
|
2
|
+
type Props = {
|
|
3
|
+
data?: Row[];
|
|
4
|
+
x?: string;
|
|
5
|
+
y?: string;
|
|
6
|
+
fill?: string;
|
|
7
|
+
width?: number;
|
|
8
|
+
height?: number;
|
|
9
|
+
mode?: 'light' | 'dark';
|
|
10
|
+
grid?: boolean;
|
|
11
|
+
legend?: boolean;
|
|
12
|
+
yFormat?: (v: unknown) => string;
|
|
13
|
+
yTicks?: number;
|
|
14
|
+
minorTicks?: boolean;
|
|
15
|
+
};
|
|
16
|
+
declare const ViolinPlot: import("svelte").Component<Props, {}, "">;
|
|
17
|
+
type ViolinPlot = ReturnType<typeof ViolinPlot>;
|
|
18
|
+
export default ViolinPlot;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import { createCrossFilter } from './createCrossFilter.svelte.js';
|
|
3
|
+
type CrossFilter = ReturnType<typeof createCrossFilter>;
|
|
4
|
+
type FilterState = CrossFilter['filters'];
|
|
5
|
+
type Props = {
|
|
6
|
+
crossfilter?: CrossFilter;
|
|
7
|
+
mode?: 'dim' | 'hide';
|
|
8
|
+
filters?: FilterState;
|
|
9
|
+
children?: Snippet;
|
|
10
|
+
};
|
|
11
|
+
declare const CrossFilter: import("svelte").Component<Props, {}, "filters">;
|
|
12
|
+
export default CrossFilter;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
data?: Record<string, unknown>[];
|
|
3
|
+
field?: string;
|
|
4
|
+
valueField?: string;
|
|
5
|
+
stat?: string;
|
|
6
|
+
width?: number;
|
|
7
|
+
height?: number;
|
|
8
|
+
mode?: 'light' | 'dark';
|
|
9
|
+
};
|
|
10
|
+
declare const FilterBar: import("svelte").Component<Props, {}, "">;
|
|
11
|
+
type FilterBar = ReturnType<typeof FilterBar>;
|
|
12
|
+
export default FilterBar;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type Row = Record<string, unknown>;
|
|
2
|
+
/**
|
|
3
|
+
* Interactive histogram with brush selection for crossfilter range dimensions.
|
|
4
|
+
* Renders bins as bars; mouse drag selects a range and calls cf.setRange().
|
|
5
|
+
* Click without dragging clears the filter.
|
|
6
|
+
*/
|
|
7
|
+
type Props = {
|
|
8
|
+
data?: Row[];
|
|
9
|
+
field?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
bins?: number;
|
|
12
|
+
width?: number;
|
|
13
|
+
height?: number;
|
|
14
|
+
color?: string;
|
|
15
|
+
dimColor?: string;
|
|
16
|
+
};
|
|
17
|
+
declare const FilterHistogram: import("svelte").Component<Props, {}, "">;
|
|
18
|
+
type FilterHistogram = ReturnType<typeof FilterHistogram>;
|
|
19
|
+
export default FilterHistogram;
|