@rokkit/chart 1.1.17 → 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 +58 -40
- 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,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dual range slider for a continuous crossfilter dimension.
|
|
3
|
+
* NOTE: Interim implementation using HTML range inputs.
|
|
4
|
+
* The spec calls for a Plot+Point+brush architecture, deferred until brush geom is implemented.
|
|
5
|
+
*/
|
|
6
|
+
type Props = {
|
|
7
|
+
field: string;
|
|
8
|
+
min?: number;
|
|
9
|
+
max?: number;
|
|
10
|
+
step?: number;
|
|
11
|
+
label?: string;
|
|
12
|
+
};
|
|
13
|
+
declare const FilterSlider: import("svelte").Component<Props, {}, "">;
|
|
14
|
+
type FilterSlider = ReturnType<typeof FilterSlider>;
|
|
15
|
+
export default FilterSlider;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Readable } from 'svelte/store';
|
|
2
|
+
type Scales = {
|
|
3
|
+
x: (value: number) => number;
|
|
4
|
+
};
|
|
5
|
+
type Props = {
|
|
6
|
+
rank: number;
|
|
7
|
+
value: number;
|
|
8
|
+
name: string;
|
|
9
|
+
formatString?: string;
|
|
10
|
+
scales: Readable<Scales>;
|
|
11
|
+
height?: number;
|
|
12
|
+
fill?: string;
|
|
13
|
+
spaceBetween?: number;
|
|
14
|
+
};
|
|
15
|
+
declare const Bar: import("svelte").Component<Props, {}, "">;
|
|
16
|
+
type Bar = ReturnType<typeof Bar>;
|
|
17
|
+
export default Bar;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type ColorScale = {
|
|
2
|
+
(value: number): string;
|
|
3
|
+
domain(): number[];
|
|
4
|
+
ticks(count?: number): number[];
|
|
5
|
+
};
|
|
6
|
+
type Props = {
|
|
7
|
+
x?: number;
|
|
8
|
+
y?: number;
|
|
9
|
+
textSize?: number;
|
|
10
|
+
height?: number;
|
|
11
|
+
width?: number;
|
|
12
|
+
tickCount?: number;
|
|
13
|
+
scale: ColorScale;
|
|
14
|
+
};
|
|
15
|
+
declare const ColorRamp: import("svelte").Component<Props, {}, "">;
|
|
16
|
+
type ColorRamp = ReturnType<typeof ColorRamp>;
|
|
17
|
+
export default ColorRamp;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type ColorScale = {
|
|
2
|
+
(value: number): string;
|
|
3
|
+
domain(): number[];
|
|
4
|
+
ticks?(count?: number): number[];
|
|
5
|
+
};
|
|
6
|
+
type Props = {
|
|
7
|
+
x?: number;
|
|
8
|
+
y?: number;
|
|
9
|
+
textSize?: number;
|
|
10
|
+
height?: number;
|
|
11
|
+
width?: number;
|
|
12
|
+
tickCount?: number;
|
|
13
|
+
scale: ColorScale;
|
|
14
|
+
id?: string;
|
|
15
|
+
};
|
|
16
|
+
declare const ContinuousLegend: import("svelte").Component<Props, {}, "">;
|
|
17
|
+
type ContinuousLegend = ReturnType<typeof ContinuousLegend>;
|
|
18
|
+
export default ContinuousLegend;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Component } from 'svelte';
|
|
2
|
+
import type { SVGAttributes } from 'svelte/elements';
|
|
3
|
+
type PatternComponentProps = {
|
|
4
|
+
size?: number;
|
|
5
|
+
fill?: string;
|
|
6
|
+
stroke?: string;
|
|
7
|
+
};
|
|
8
|
+
type Pattern = {
|
|
9
|
+
id: string;
|
|
10
|
+
component: Component<PatternComponentProps>;
|
|
11
|
+
fill?: string;
|
|
12
|
+
stroke?: string;
|
|
13
|
+
};
|
|
14
|
+
type Props = {
|
|
15
|
+
size?: number;
|
|
16
|
+
patternUnits?: SVGAttributes<SVGPatternElement>['patternUnits'];
|
|
17
|
+
patterns?: Pattern[];
|
|
18
|
+
};
|
|
19
|
+
declare const DefinePatterns: Component<Props, {}, "">;
|
|
20
|
+
type DefinePatterns = ReturnType<typeof DefinePatterns>;
|
|
21
|
+
export default DefinePatterns;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type ColorScale = {
|
|
2
|
+
(value: number): string;
|
|
3
|
+
ticks(count?: number): number[];
|
|
4
|
+
};
|
|
5
|
+
type Props = {
|
|
6
|
+
x?: number;
|
|
7
|
+
y?: number;
|
|
8
|
+
textSize?: number;
|
|
9
|
+
size?: number;
|
|
10
|
+
space?: number;
|
|
11
|
+
padding?: number;
|
|
12
|
+
scale: ColorScale;
|
|
13
|
+
tickCount?: number;
|
|
14
|
+
};
|
|
15
|
+
declare const DiscreteLegend: import("svelte").Component<Props, {}, "">;
|
|
16
|
+
type DiscreteLegend = ReturnType<typeof DiscreteLegend>;
|
|
17
|
+
export default DiscreteLegend;
|
|
@@ -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 BarChartExample: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
}, {}, {}, string>;
|
|
17
|
+
type BarChartExample = InstanceType<typeof BarChartExample>;
|
|
18
|
+
export default BarChartExample;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type Row = Record<string, unknown>;
|
|
2
|
+
/**
|
|
3
|
+
* `fill` is the primary prop name; `color` is accepted as an alias for
|
|
4
|
+
* spec-driven usage (Plot.svelte passes `color` to all geoms generically).
|
|
5
|
+
*/
|
|
6
|
+
type Props = {
|
|
7
|
+
theta?: string;
|
|
8
|
+
fill?: string;
|
|
9
|
+
color?: string;
|
|
10
|
+
pattern?: string;
|
|
11
|
+
stat?: string;
|
|
12
|
+
labelFn?: (data: Row) => string;
|
|
13
|
+
options?: {
|
|
14
|
+
innerRadius?: number;
|
|
15
|
+
};
|
|
16
|
+
onselect?: (data: Row) => void;
|
|
17
|
+
};
|
|
18
|
+
declare const Arc: import("svelte").Component<Props, {}, "">;
|
|
19
|
+
type Arc = ReturnType<typeof Arc>;
|
|
20
|
+
export default Arc;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type Options = {
|
|
2
|
+
stack?: boolean;
|
|
3
|
+
curve?: 'linear' | 'smooth' | 'step';
|
|
4
|
+
opacity?: number;
|
|
5
|
+
};
|
|
6
|
+
type Props = {
|
|
7
|
+
x?: string;
|
|
8
|
+
y?: string;
|
|
9
|
+
color?: string;
|
|
10
|
+
pattern?: string;
|
|
11
|
+
stat?: string;
|
|
12
|
+
options?: Options;
|
|
13
|
+
};
|
|
14
|
+
declare const Area: import("svelte").Component<Props, {}, "">;
|
|
15
|
+
type Area = ReturnType<typeof Area>;
|
|
16
|
+
export default Area;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type Row = Record<string, unknown>;
|
|
2
|
+
type Options = {
|
|
3
|
+
stack?: boolean;
|
|
4
|
+
orientation?: 'horizontal' | 'vertical';
|
|
5
|
+
labelInside?: boolean;
|
|
6
|
+
labelOffset?: number;
|
|
7
|
+
};
|
|
8
|
+
type Props = {
|
|
9
|
+
x?: string;
|
|
10
|
+
y?: string;
|
|
11
|
+
color?: string;
|
|
12
|
+
fill?: string;
|
|
13
|
+
pattern?: string;
|
|
14
|
+
label?: boolean | string | ((data: Row) => unknown);
|
|
15
|
+
stat?: string;
|
|
16
|
+
options?: Options;
|
|
17
|
+
filterable?: boolean;
|
|
18
|
+
onselect?: (data: Row) => void;
|
|
19
|
+
keyboard?: boolean;
|
|
20
|
+
};
|
|
21
|
+
declare const Bar: import("svelte").Component<Props, {}, "">;
|
|
22
|
+
type Bar = ReturnType<typeof Bar>;
|
|
23
|
+
export default Bar;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type Options = {
|
|
2
|
+
open?: string;
|
|
3
|
+
high?: string;
|
|
4
|
+
low?: string;
|
|
5
|
+
close?: string;
|
|
6
|
+
upColor?: string;
|
|
7
|
+
downColor?: string;
|
|
8
|
+
wickWidth?: number;
|
|
9
|
+
};
|
|
10
|
+
type Props = {
|
|
11
|
+
x?: string;
|
|
12
|
+
y?: string;
|
|
13
|
+
color?: string;
|
|
14
|
+
fill?: string;
|
|
15
|
+
stat?: string;
|
|
16
|
+
options?: Options;
|
|
17
|
+
};
|
|
18
|
+
declare const Candlestick: import("svelte").Component<Props, {}, "">;
|
|
19
|
+
type Candlestick = ReturnType<typeof Candlestick>;
|
|
20
|
+
export default Candlestick;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
x?: string;
|
|
3
|
+
y?: string;
|
|
4
|
+
color?: string;
|
|
5
|
+
fill?: string;
|
|
6
|
+
stat?: string;
|
|
7
|
+
options?: {
|
|
8
|
+
rounded?: number;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
declare const Heatmap: import("svelte").Component<Props, {}, "">;
|
|
12
|
+
type Heatmap = ReturnType<typeof Heatmap>;
|
|
13
|
+
export default Heatmap;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
x?: string;
|
|
3
|
+
y?: string;
|
|
4
|
+
color?: string;
|
|
5
|
+
fill?: string;
|
|
6
|
+
stat?: string;
|
|
7
|
+
options?: {
|
|
8
|
+
radius?: number;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
declare const Hexbin: import("svelte").Component<Props, {}, "">;
|
|
12
|
+
type Hexbin = ReturnType<typeof Hexbin>;
|
|
13
|
+
export default Hexbin;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type Row = Record<string, unknown>;
|
|
2
|
+
type Options = {
|
|
3
|
+
curve?: 'linear' | 'smooth' | 'step';
|
|
4
|
+
strokeWidth?: number;
|
|
5
|
+
markerRadius?: number;
|
|
6
|
+
labelOffset?: {
|
|
7
|
+
x?: number;
|
|
8
|
+
y?: number;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
type Props = {
|
|
12
|
+
x?: string;
|
|
13
|
+
y?: string;
|
|
14
|
+
color?: string;
|
|
15
|
+
symbol?: string;
|
|
16
|
+
label?: boolean | string | ((data: Row) => unknown);
|
|
17
|
+
stat?: string;
|
|
18
|
+
options?: Options;
|
|
19
|
+
onselect?: (data: Row) => void;
|
|
20
|
+
keyboard?: boolean;
|
|
21
|
+
};
|
|
22
|
+
declare const Line: import("svelte").Component<Props, {}, "">;
|
|
23
|
+
type Line = ReturnType<typeof Line>;
|
|
24
|
+
export default Line;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
type Row = Record<string, unknown>;
|
|
2
|
+
type Options = {
|
|
3
|
+
minRadius?: number;
|
|
4
|
+
maxRadius?: number;
|
|
5
|
+
radius?: number;
|
|
6
|
+
opacity?: number;
|
|
7
|
+
jitter?: {
|
|
8
|
+
width?: number;
|
|
9
|
+
height?: number;
|
|
10
|
+
} | null;
|
|
11
|
+
labelOffset?: {
|
|
12
|
+
x?: number;
|
|
13
|
+
y?: number;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
type Props = {
|
|
17
|
+
x?: string;
|
|
18
|
+
y?: string;
|
|
19
|
+
color?: string;
|
|
20
|
+
size?: string;
|
|
21
|
+
symbol?: string;
|
|
22
|
+
label?: boolean | string | ((data: Row) => unknown);
|
|
23
|
+
stat?: string;
|
|
24
|
+
options?: Options;
|
|
25
|
+
onselect?: (data: Row) => void;
|
|
26
|
+
keyboard?: boolean;
|
|
27
|
+
};
|
|
28
|
+
declare const Point: import("svelte").Component<Props, {}, "">;
|
|
29
|
+
type Point = ReturnType<typeof Point>;
|
|
30
|
+
export default Point;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type Options = {
|
|
2
|
+
source?: string;
|
|
3
|
+
target?: string;
|
|
4
|
+
value?: string;
|
|
5
|
+
};
|
|
6
|
+
type Props = {
|
|
7
|
+
x?: string;
|
|
8
|
+
y?: string;
|
|
9
|
+
color?: string;
|
|
10
|
+
fill?: string;
|
|
11
|
+
stat?: string;
|
|
12
|
+
options?: Options;
|
|
13
|
+
};
|
|
14
|
+
declare const Ribbon: import("svelte").Component<Props, {}, "">;
|
|
15
|
+
type Ribbon = ReturnType<typeof Ribbon>;
|
|
16
|
+
export default Ribbon;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
x?: string;
|
|
3
|
+
y?: string;
|
|
4
|
+
fill?: string;
|
|
5
|
+
stat?: string;
|
|
6
|
+
options?: {
|
|
7
|
+
opacity?: number;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
declare const Violin: import("svelte").Component<Props, {}, "">;
|
|
11
|
+
type Violin = ReturnType<typeof Violin>;
|
|
12
|
+
export default Violin;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type Options = {
|
|
2
|
+
positiveColor?: string;
|
|
3
|
+
negativeColor?: string;
|
|
4
|
+
totalColor?: string;
|
|
5
|
+
totalField?: string;
|
|
6
|
+
connectorWidth?: number;
|
|
7
|
+
};
|
|
8
|
+
type Props = {
|
|
9
|
+
x?: string;
|
|
10
|
+
y?: string;
|
|
11
|
+
color?: string;
|
|
12
|
+
fill?: string;
|
|
13
|
+
stat?: string;
|
|
14
|
+
options?: Options;
|
|
15
|
+
};
|
|
16
|
+
declare const Waterfall: import("svelte").Component<Props, {}, "">;
|
|
17
|
+
type Waterfall = ReturnType<typeof Waterfall>;
|
|
18
|
+
export default Waterfall;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Builds area path geometry for multi-series area charts.
|
|
3
3
|
*
|
|
4
4
|
* @param {Object[]} data
|
|
5
|
-
* @param {{ x: string, y: string, color?: string }} channels
|
|
5
|
+
* @param {{ x: string, y: string, color?: string, pattern?: string }} channels
|
|
6
6
|
* @param {Function} xScale
|
|
7
7
|
* @param {Function} yScale
|
|
8
8
|
* @param {Map<unknown, {fill: string, stroke: string}>} colors
|
|
@@ -14,6 +14,7 @@ export function buildAreas(data: Object[], channels: {
|
|
|
14
14
|
x: string;
|
|
15
15
|
y: string;
|
|
16
16
|
color?: string;
|
|
17
|
+
pattern?: string;
|
|
17
18
|
}, xScale: Function, yScale: Function, colors: Map<unknown, {
|
|
18
19
|
fill: string;
|
|
19
20
|
stroke: string;
|
|
@@ -28,7 +29,7 @@ export function buildAreas(data: Object[], channels: {
|
|
|
28
29
|
* Builds stacked area paths using d3 stack layout.
|
|
29
30
|
*
|
|
30
31
|
* @param {Object[]} data
|
|
31
|
-
* @param {{ x: string, y: string, color
|
|
32
|
+
* @param {{ x: string, y: string, color?: string, pattern?: string }} channels
|
|
32
33
|
* @param {Function} xScale
|
|
33
34
|
* @param {Function} yScale
|
|
34
35
|
* @param {Map<unknown, {fill: string, stroke: string}>} colors
|
|
@@ -39,7 +40,8 @@ export function buildAreas(data: Object[], channels: {
|
|
|
39
40
|
export function buildStackedAreas(data: Object[], channels: {
|
|
40
41
|
x: string;
|
|
41
42
|
y: string;
|
|
42
|
-
color
|
|
43
|
+
color?: string;
|
|
44
|
+
pattern?: string;
|
|
43
45
|
}, xScale: Function, yScale: Function, colors: Map<unknown, {
|
|
44
46
|
fill: string;
|
|
45
47
|
stroke: string;
|
|
@@ -39,23 +39,23 @@ export class ChartBrewer {
|
|
|
39
39
|
symbolMap: Map<unknown, string>;
|
|
40
40
|
get innerWidth(): number;
|
|
41
41
|
get innerHeight(): number;
|
|
42
|
-
xScale:
|
|
43
|
-
yScale:
|
|
44
|
-
sizeScale:
|
|
42
|
+
xScale: import("d3-scale").ScaleBand<string> | (number[] & import("d3-scale").ScaleLinear<number, number, never>) | null;
|
|
43
|
+
yScale: import("d3-scale").ScaleLinear<number, number, never> | null;
|
|
44
|
+
sizeScale: import("d3-scale").ScalePower<number, number, never> | null;
|
|
45
45
|
bars: any;
|
|
46
46
|
lines: {
|
|
47
|
-
d: string;
|
|
47
|
+
d: string | null;
|
|
48
48
|
fill: string;
|
|
49
49
|
stroke: string;
|
|
50
50
|
points: {
|
|
51
51
|
x: number;
|
|
52
52
|
y: number;
|
|
53
|
-
data:
|
|
53
|
+
data: Record<string, unknown>;
|
|
54
54
|
}[];
|
|
55
55
|
key?: unknown;
|
|
56
56
|
}[];
|
|
57
57
|
areas: {
|
|
58
|
-
d:
|
|
58
|
+
d: string | null;
|
|
59
59
|
fill: any;
|
|
60
60
|
stroke: string;
|
|
61
61
|
key: any;
|
|
@@ -63,23 +63,32 @@ export class ChartBrewer {
|
|
|
63
63
|
patternKey: any;
|
|
64
64
|
patternId: string | null;
|
|
65
65
|
}[] | {
|
|
66
|
-
d:
|
|
66
|
+
d: never;
|
|
67
67
|
fill: any;
|
|
68
68
|
stroke: string;
|
|
69
69
|
colorKey: null;
|
|
70
70
|
patternKey: null;
|
|
71
71
|
patternId: null;
|
|
72
72
|
}[];
|
|
73
|
-
arcs:
|
|
73
|
+
arcs: {
|
|
74
|
+
d: string | null;
|
|
75
|
+
fill: string;
|
|
76
|
+
stroke: string;
|
|
77
|
+
key: unknown;
|
|
78
|
+
patternId: string | null;
|
|
79
|
+
pct: number;
|
|
80
|
+
centroid: [number, number];
|
|
81
|
+
data: Record<string, unknown>;
|
|
82
|
+
}[];
|
|
74
83
|
points: {
|
|
75
|
-
data:
|
|
76
|
-
cx:
|
|
77
|
-
cy:
|
|
78
|
-
r:
|
|
79
|
-
fill:
|
|
80
|
-
stroke:
|
|
84
|
+
data: Record<string, unknown>;
|
|
85
|
+
cx: number;
|
|
86
|
+
cy: number;
|
|
87
|
+
r: number;
|
|
88
|
+
fill: string;
|
|
89
|
+
stroke: string;
|
|
81
90
|
symbolPath: string | null;
|
|
82
|
-
key:
|
|
91
|
+
key: unknown;
|
|
83
92
|
}[];
|
|
84
93
|
legendGroups: {
|
|
85
94
|
field: any;
|
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Builds arc geometry for pie/donut charts.
|
|
3
|
-
* @param {
|
|
4
|
-
* @param {{ color
|
|
3
|
+
* @param {Record<string, unknown>[]} data
|
|
4
|
+
* @param {{ color?: string, y?: string, pattern?: string }} channels
|
|
5
5
|
* @param {Map} colors
|
|
6
6
|
* @param {number} width
|
|
7
7
|
* @param {number} height
|
|
8
8
|
* @param {{ innerRadius?: number }} opts
|
|
9
9
|
* @param {Map<unknown, string>} [patterns]
|
|
10
|
+
* @returns {{ d: string | null, fill: string, stroke: string, key: unknown, patternId: string | null, pct: number, centroid: [number, number], data: Record<string, unknown> }[]}
|
|
10
11
|
*/
|
|
11
|
-
export function buildArcs(data:
|
|
12
|
-
color
|
|
13
|
-
y
|
|
12
|
+
export function buildArcs(data: Record<string, unknown>[], channels: {
|
|
13
|
+
color?: string;
|
|
14
|
+
y?: string;
|
|
14
15
|
pattern?: string;
|
|
15
16
|
}, colors: Map<any, any>, width: number, height: number, opts?: {
|
|
16
17
|
innerRadius?: number;
|
|
17
|
-
}, patterns?: Map<unknown, string>):
|
|
18
|
+
}, patterns?: Map<unknown, string>): {
|
|
19
|
+
d: string | null;
|
|
20
|
+
fill: string;
|
|
21
|
+
stroke: string;
|
|
22
|
+
key: unknown;
|
|
23
|
+
patternId: string | null;
|
|
24
|
+
pct: number;
|
|
25
|
+
centroid: [number, number];
|
|
26
|
+
data: Record<string, unknown>;
|
|
27
|
+
}[];
|
|
@@ -14,7 +14,7 @@ export function buildAreas(data: Object[], channels: {
|
|
|
14
14
|
fill?: string;
|
|
15
15
|
pattern?: string;
|
|
16
16
|
}, xScale: Function, yScale: Function, colors: Map<any, any>, curve?: "linear" | "smooth" | "step", patternMap?: Map<any, any>): {
|
|
17
|
-
d:
|
|
17
|
+
d: string | null;
|
|
18
18
|
fill: any;
|
|
19
19
|
stroke: string;
|
|
20
20
|
key: any;
|
|
@@ -22,7 +22,7 @@ export function buildAreas(data: Object[], channels: {
|
|
|
22
22
|
patternKey: any;
|
|
23
23
|
patternId: string | null;
|
|
24
24
|
}[] | {
|
|
25
|
-
d:
|
|
25
|
+
d: never;
|
|
26
26
|
fill: any;
|
|
27
27
|
stroke: string;
|
|
28
28
|
colorKey: null;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Box body uses the lighter fill shade; whiskers and median use the darker stroke shade.
|
|
9
9
|
*
|
|
10
10
|
* @param {Object[]} data - Pre-aggregated rows with quartile fields
|
|
11
|
-
* @param {{ x
|
|
11
|
+
* @param {{ x?: string, fill?: string }} channels
|
|
12
12
|
* `fill` drives the box and whisker color (defaults to x-field).
|
|
13
13
|
* @param {import('d3-scale').ScaleBand} xScale
|
|
14
14
|
* @param {import('d3-scale').ScaleLinear} yScale
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
* @returns {Array}
|
|
17
17
|
*/
|
|
18
18
|
export function buildBoxes(data: Object[], channels: {
|
|
19
|
-
x
|
|
19
|
+
x?: string;
|
|
20
20
|
fill?: string;
|
|
21
|
-
}, xScale: any
|
|
21
|
+
}, xScale: import("d3-scale").ScaleBand<any>, yScale: import("d3-scale").ScaleLinear<any, any, never>, colors: Map<unknown, {
|
|
22
22
|
fill: string;
|
|
23
23
|
stroke: string;
|
|
24
24
|
}>): any[];
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @param {Object[]} data
|
|
3
|
-
* @param {{ x
|
|
3
|
+
* @param {{ x?: string, y?: string, color?: string }} channels
|
|
4
4
|
* @param {Function} xScale
|
|
5
5
|
* @param {Function} yScale
|
|
6
6
|
* @param {Map} colors
|
|
7
7
|
* @param {'linear'|'smooth'|'step'} [curve]
|
|
8
|
-
* @returns {{ d: string, fill: string, stroke: string, points: {x:number, y:number, data:
|
|
8
|
+
* @returns {{ d: string | null, fill: string, stroke: string, points: {x:number, y:number, data: Record<string, unknown>}[], key?: unknown }[]}
|
|
9
9
|
*/
|
|
10
10
|
export function buildLines(data: Object[], channels: {
|
|
11
|
-
x
|
|
12
|
-
y
|
|
11
|
+
x?: string;
|
|
12
|
+
y?: string;
|
|
13
13
|
color?: string;
|
|
14
14
|
}, xScale: Function, yScale: Function, colors: Map<any, any>, curve?: "linear" | "smooth" | "step"): {
|
|
15
|
-
d: string;
|
|
15
|
+
d: string | null;
|
|
16
16
|
fill: string;
|
|
17
17
|
stroke: string;
|
|
18
18
|
points: {
|
|
19
19
|
x: number;
|
|
20
20
|
y: number;
|
|
21
|
-
data:
|
|
21
|
+
data: Record<string, unknown>;
|
|
22
22
|
}[];
|
|
23
23
|
key?: unknown;
|
|
24
24
|
}[];
|
|
@@ -23,8 +23,8 @@ export function buildSymbolPath(shapeName: string, r: number): string;
|
|
|
23
23
|
export function jitterOffset(i: number, range: number): number;
|
|
24
24
|
/**
|
|
25
25
|
* Builds point geometry for scatter/bubble charts.
|
|
26
|
-
* @param {
|
|
27
|
-
* @param {{ x
|
|
26
|
+
* @param {Record<string, unknown>[]} data
|
|
27
|
+
* @param {{ x?: string, y?: string, color?: string, size?: string, symbol?: string }} channels
|
|
28
28
|
* @param {Function} xScale
|
|
29
29
|
* @param {Function} yScale
|
|
30
30
|
* @param {Map} colors
|
|
@@ -32,10 +32,11 @@ export function jitterOffset(i: number, range: number): number;
|
|
|
32
32
|
* @param {Map<unknown, string>|null} symbolMap — maps symbol field value → shape name
|
|
33
33
|
* @param {number} defaultRadius
|
|
34
34
|
* @param {{ width?: number, height?: number }|null} jitter
|
|
35
|
+
* @returns {{ data: Record<string, unknown>, cx: number, cy: number, r: number, fill: string, stroke: string, symbolPath: string | null, key: unknown }[]}
|
|
35
36
|
*/
|
|
36
|
-
export function buildPoints(data:
|
|
37
|
-
x
|
|
38
|
-
y
|
|
37
|
+
export function buildPoints(data: Record<string, unknown>[], channels: {
|
|
38
|
+
x?: string;
|
|
39
|
+
y?: string;
|
|
39
40
|
color?: string;
|
|
40
41
|
size?: string;
|
|
41
42
|
symbol?: string;
|
|
@@ -43,13 +44,13 @@ export function buildPoints(data: Object[], channels: {
|
|
|
43
44
|
width?: number;
|
|
44
45
|
height?: number;
|
|
45
46
|
} | null): {
|
|
46
|
-
data:
|
|
47
|
-
cx:
|
|
48
|
-
cy:
|
|
49
|
-
r:
|
|
50
|
-
fill:
|
|
51
|
-
stroke:
|
|
47
|
+
data: Record<string, unknown>;
|
|
48
|
+
cx: number;
|
|
49
|
+
cy: number;
|
|
50
|
+
r: number;
|
|
51
|
+
fill: string;
|
|
52
|
+
stroke: string;
|
|
52
53
|
symbolPath: string | null;
|
|
53
|
-
key:
|
|
54
|
+
key: unknown;
|
|
54
55
|
}[];
|
|
55
56
|
import { defaultPreset } from '../../preset.js';
|