@sophistry/charts 0.0.0-stage → 0.1.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 +21 -0
- package/README.md +32 -2
- package/dist/3d/bar-chart3d.d.ts +55 -0
- package/dist/3d/definitions.d.ts +37 -0
- package/dist/3d/definitions.js +14 -0
- package/dist/3d/forward.d.ts +64 -0
- package/dist/3d/index.d.ts +30 -0
- package/dist/3d/index.js +1 -0
- package/dist/3d/quiver3d.d.ts +52 -0
- package/dist/3d/scatter3d.d.ts +44 -0
- package/dist/3d/stem3d.d.ts +45 -0
- package/dist/3d/surface-grid3d.d.ts +33 -0
- package/dist/3d/tri-surface3d.d.ts +45 -0
- package/dist/3d/voxels3d.d.ts +25 -0
- package/dist/3d/wireframe3d.d.ts +30 -0
- package/dist/band.d.ts +20 -0
- package/dist/bars/bar-chart.d.ts +143 -0
- package/dist/bars/bar-labels.d.ts +116 -0
- package/dist/bars/bars.d.ts +223 -0
- package/dist/bars/bullet.d.ts +157 -0
- package/dist/bars/candlestick.d.ts +97 -0
- package/dist/bars/funnel.d.ts +90 -0
- package/dist/bars/histogram.d.ts +108 -0
- package/dist/bars/index.d.ts +22 -0
- package/dist/bars/race.d.ts +28 -0
- package/dist/bars/rules.d.ts +121 -0
- package/dist/bars/shared.d.ts +41 -0
- package/dist/bars/transforms.d.ts +249 -0
- package/dist/bars/waterfall.d.ts +106 -0
- package/dist/batch.d.ts +142 -0
- package/dist/channels-_Xf-p6Lx.js +56 -0
- package/dist/chart.d.ts +87 -0
- package/dist/color-norm.d.ts +90 -0
- package/dist/context.d.ts +111 -0
- package/dist/curves/density.d.ts +125 -0
- package/dist/curves/ecdf.d.ts +72 -0
- package/dist/curves/fill-between.d.ts +100 -0
- package/dist/curves/index.d.ts +15 -0
- package/dist/curves/line-plot.d.ts +104 -0
- package/dist/curves/regression.d.ts +124 -0
- package/dist/curves/shared.d.ts +52 -0
- package/dist/curves/stack-plot.d.ts +140 -0
- package/dist/curves/stairs.d.ts +170 -0
- package/dist/data/channels.d.ts +170 -0
- package/dist/end-space.d.ts +81 -0
- package/dist/entries/definitions.d.ts +20 -0
- package/dist/entries/definitions.js +6 -0
- package/dist/frame/band-axis.d.ts +42 -0
- package/dist/frame/coords.d.ts +111 -0
- package/dist/frame/fit.d.ts +170 -0
- package/dist/frame/format.d.ts +40 -0
- package/dist/frame/guide-metrics.d.ts +36 -0
- package/dist/frame/guides.d.ts +67 -0
- package/dist/frame/keys.d.ts +96 -0
- package/dist/frame/layout.d.ts +145 -0
- package/dist/frame/registry.d.ts +31 -0
- package/dist/frame/reports.d.ts +53 -0
- package/dist/frame/secondary-axes.d.ts +73 -0
- package/dist/frame/secondary.d.ts +56 -0
- package/dist/frame/tooltip-overlay.d.ts +64 -0
- package/dist/frame/types.d.ts +658 -0
- package/dist/grids/barbs.d.ts +51 -0
- package/dist/grids/cell-rects.d.ts +37 -0
- package/dist/grids/cells.d.ts +130 -0
- package/dist/grids/contour-f.d.ts +80 -0
- package/dist/grids/contour-shared.d.ts +53 -0
- package/dist/grids/contour.d.ts +84 -0
- package/dist/grids/dendrogram.d.ts +104 -0
- package/dist/grids/heatmap.d.ts +163 -0
- package/dist/grids/hex-bin.d.ts +93 -0
- package/dist/grids/hist2d.d.ts +107 -0
- package/dist/grids/imshow.d.ts +84 -0
- package/dist/grids/index.d.ts +26 -0
- package/dist/grids/pcolormesh.d.ts +90 -0
- package/dist/grids/ramp-cells.d.ts +66 -0
- package/dist/grids/tri-contour.d.ts +120 -0
- package/dist/grids/tri-shared.d.ts +61 -0
- package/dist/grids/tripcolor.d.ts +73 -0
- package/dist/guides/colorbar.d.ts +110 -0
- package/dist/guides/index.d.ts +11 -0
- package/dist/guides/legend.d.ts +118 -0
- package/dist/guides/nodes.d.ts +13 -0
- package/dist/guides/size-legend.d.ts +233 -0
- package/dist/hierarchy/breadcrumbs.d.ts +133 -0
- package/dist/hierarchy/circle-pack.d.ts +72 -0
- package/dist/hierarchy/drill.d.ts +245 -0
- package/dist/hierarchy/frame.d.ts +67 -0
- package/dist/hierarchy/icicle.d.ts +76 -0
- package/dist/hierarchy/index.d.ts +20 -0
- package/dist/hierarchy/labels.d.ts +24 -0
- package/dist/hierarchy/mosaic.d.ts +130 -0
- package/dist/hierarchy/own-tooltip.d.ts +12 -0
- package/dist/hierarchy/props.d.ts +13 -0
- package/dist/hierarchy/sankey.d.ts +132 -0
- package/dist/hierarchy/shared.d.ts +247 -0
- package/dist/hierarchy/sunburst.d.ts +74 -0
- package/dist/hierarchy/tree.d.ts +124 -0
- package/dist/hierarchy/treemap.d.ts +76 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +5 -0
- package/dist/item-tooltip.d.ts +33 -0
- package/dist/join.d.ts +223 -0
- package/dist/math/3d/bar3d.d.ts +27 -0
- package/dist/math/3d/quiver3d.d.ts +26 -0
- package/dist/math/3d/scatter3d.d.ts +15 -0
- package/dist/math/3d/stem3d.d.ts +22 -0
- package/dist/math/3d/surfaceGrid3d.d.ts +33 -0
- package/dist/math/3d/trisurface.d.ts +11 -0
- package/dist/math/3d/voxels.d.ts +17 -0
- package/dist/math/aggregate.d.ts +68 -0
- package/dist/math/bar.d.ts +31 -0
- package/dist/math/barLabels.d.ts +83 -0
- package/dist/math/barbs.d.ts +36 -0
- package/dist/math/boxplot.d.ts +36 -0
- package/dist/math/breadcrumbs.d.ts +128 -0
- package/dist/math/bubble.d.ts +38 -0
- package/dist/math/bullet.d.ts +110 -0
- package/dist/math/chord.d.ts +103 -0
- package/dist/math/cluster.d.ts +88 -0
- package/dist/math/contour.d.ts +48 -0
- package/dist/math/contourf.d.ts +50 -0
- package/dist/math/dodge.d.ts +36 -0
- package/dist/math/ecdf.d.ts +41 -0
- package/dist/math/errorbar.d.ts +27 -0
- package/dist/math/eventplot.d.ts +26 -0
- package/dist/math/facet.d.ts +90 -0
- package/dist/math/fillBetween.d.ts +28 -0
- package/dist/math/gauge.d.ts +71 -0
- package/dist/math/hexbin.d.ts +20 -0
- package/dist/math/hierarchy.d.ts +179 -0
- package/dist/math/hierarchyJoin.d.ts +59 -0
- package/dist/math/histogram.d.ts +36 -0
- package/dist/math/histogram2d.d.ts +44 -0
- package/dist/math/imshow.d.ts +26 -0
- package/dist/math/index.d.ts +139 -0
- package/dist/math/index.js +3 -0
- package/dist/math/jitter.d.ts +16 -0
- package/dist/math/join.d.ts +135 -0
- package/dist/math/keyframes.d.ts +127 -0
- package/dist/math/legend.d.ts +120 -0
- package/dist/math/line.d.ts +53 -0
- package/dist/math/morph.d.ts +81 -0
- package/dist/math/mosaic.d.ts +119 -0
- package/dist/math/ordinal.d.ts +79 -0
- package/dist/math/parallel.d.ts +38 -0
- package/dist/math/pcolormesh.d.ts +22 -0
- package/dist/math/pie.d.ts +105 -0
- package/dist/math/polarArea.d.ts +34 -0
- package/dist/math/radar.d.ts +110 -0
- package/dist/math/range.d.ts +98 -0
- package/dist/math/regression.d.ts +109 -0
- package/dist/math/reveal.d.ts +63 -0
- package/dist/math/sankey.d.ts +154 -0
- package/dist/math/scatter.d.ts +14 -0
- package/dist/math/shared/binning.d.ts +23 -0
- package/dist/math/shared/gridCells.d.ts +41 -0
- package/dist/math/shared/gridExtent.d.ts +5 -0
- package/dist/math/shared/pairs.d.ts +2 -0
- package/dist/math/shared/polar.d.ts +23 -0
- package/dist/math/stack.d.ts +69 -0
- package/dist/math/stackplot.d.ts +35 -0
- package/dist/math/stairs.d.ts +17 -0
- package/dist/math/stem.d.ts +21 -0
- package/dist/math/symbol.d.ts +25 -0
- package/dist/math/tree.d.ts +117 -0
- package/dist/math/tricontour.d.ts +76 -0
- package/dist/math/violin.d.ts +99 -0
- package/dist/math/waffle.d.ts +48 -0
- package/dist/math/waterfall.d.ts +28 -0
- package/dist/math-CSHNpGej.js +3648 -0
- package/dist/mix.d.ts +24 -0
- package/dist/multiview/brush.d.ts +165 -0
- package/dist/multiview/chart-group.d.ts +265 -0
- package/dist/multiview/chart-link.d.ts +188 -0
- package/dist/multiview/chart-zoom.d.ts +144 -0
- package/dist/multiview/facet.d.ts +238 -0
- package/dist/multiview/group-guides.d.ts +99 -0
- package/dist/multiview/index.d.ts +17 -0
- package/dist/multiview/joint-plot.d.ts +114 -0
- package/dist/multiview/pair-plot.d.ts +153 -0
- package/dist/multiview/panels.d.ts +22 -0
- package/dist/multiview/parallel-coordinates.d.ts +109 -0
- package/dist/points/event-plot.d.ts +67 -0
- package/dist/points/index.d.ts +19 -0
- package/dist/points/labels.d.ts +70 -0
- package/dist/points/links.d.ts +123 -0
- package/dist/points/rects.d.ts +80 -0
- package/dist/points/rug.d.ts +72 -0
- package/dist/points/scatter.d.ts +169 -0
- package/dist/points/segment-marks.d.ts +39 -0
- package/dist/points/shared.d.ts +34 -0
- package/dist/points/stem.d.ts +75 -0
- package/dist/points/strip.d.ts +145 -0
- package/dist/points/symbol-marker.d.ts +33 -0
- package/dist/points/ticks.d.ts +102 -0
- package/dist/props.d.ts +126 -0
- package/dist/radial/chord.d.ts +148 -0
- package/dist/radial/gauge.d.ts +126 -0
- package/dist/radial/index.d.ts +15 -0
- package/dist/radial/pie-chart.d.ts +143 -0
- package/dist/radial/polar-area-chart.d.ts +135 -0
- package/dist/radial/radar-chart.d.ts +176 -0
- package/dist/radial/radial-bar-chart.d.ts +116 -0
- package/dist/radial/shared.d.ts +78 -0
- package/dist/radial/waffle.d.ts +130 -0
- package/dist/raster.d.ts +43 -0
- package/dist/series.d.ts +71 -0
- package/dist/src-CwGo1bes.js +19221 -0
- package/dist/stagger.d.ts +54 -0
- package/dist/statistics/box-plot.d.ts +151 -0
- package/dist/statistics/error-bar.d.ts +148 -0
- package/dist/statistics/groups.d.ts +140 -0
- package/dist/statistics/index.d.ts +7 -0
- package/dist/statistics/violin-plot.d.ts +143 -0
- package/dist/text-width.d.ts +9 -0
- package/dist/tooltip.d.ts +276 -0
- package/dist/util.d.ts +33 -0
- package/dist/voxels-9lJ2TZS4.js +235 -0
- package/dist/wireframe3d-D157GZAq.js +345 -0
- package/package.json +86 -3
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wheel, pinch, drag, box and keyboard zoom for a `chart`, as a writer of
|
|
3
|
+
* the same range tracks `chartLink` and `rangeBrush` use. Zooming works in
|
|
4
|
+
* drawn positions, so log, reversed and band axes all zoom correctly.
|
|
5
|
+
*/
|
|
6
|
+
import type { BrushCell } from "./brush.js";
|
|
7
|
+
import type { BrushAxisOption } from "./chart-link.js";
|
|
8
|
+
export type { ChartZoomBox } from "./brush.js";
|
|
9
|
+
/**
|
|
10
|
+
* Props for {@link chartZoom}.
|
|
11
|
+
*
|
|
12
|
+
* @category Charts
|
|
13
|
+
*/
|
|
14
|
+
export interface ChartZoomProps {
|
|
15
|
+
/** The x range's two ends, `[from, to]`: the tracks the chart's `xRange` reads. */
|
|
16
|
+
x?: readonly [BrushCell, BrushCell];
|
|
17
|
+
/** The y range's two ends. Only the axes given (`x`, `y` or both) zoom and pan. */
|
|
18
|
+
y?: readonly [BrushCell, BrushCell];
|
|
19
|
+
/**
|
|
20
|
+
* How far the view may go, in data units: `[min, max]` per axis (or one pair for both). `0`,
|
|
21
|
+
* Home and a double tap return to them. Defaults to unbounded (a band axis is bounded by its
|
|
22
|
+
* categories).
|
|
23
|
+
*/
|
|
24
|
+
bounds?: BrushAxisOption<readonly [number, number]>;
|
|
25
|
+
/**
|
|
26
|
+
* The narrowest range a zoom in reaches, in data units (or per axis). Defaults to none (one
|
|
27
|
+
* category on a band axis).
|
|
28
|
+
*/
|
|
29
|
+
minSpan?: BrushAxisOption<number>;
|
|
30
|
+
/**
|
|
31
|
+
* What a plain wheel does over the plot: `"zoom"` about the cursor, `"pan"`, or `false` to
|
|
32
|
+
* leave it to the page. A trackpad pinch always zooms unless `false`.
|
|
33
|
+
* @default "zoom"
|
|
34
|
+
*/
|
|
35
|
+
wheel?: "zoom" | "pan" | false;
|
|
36
|
+
/**
|
|
37
|
+
* Drag on the plot to pan, two fingers to pinch-zoom.
|
|
38
|
+
* @default true
|
|
39
|
+
*/
|
|
40
|
+
pan?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* What a plain drag on the plot does: `"pan"` or `"box"` (draw a rectangle to zoom into).
|
|
43
|
+
* Shift-drag does the other. Escape cancels a box, Backspace steps back out of the last one.
|
|
44
|
+
* @default "pan"
|
|
45
|
+
*/
|
|
46
|
+
dragMode?: ChartZoomDragMode;
|
|
47
|
+
/**
|
|
48
|
+
* Called when the toolbar chooses a drag mode. With it, `dragMode` is controlled; without it,
|
|
49
|
+
* the toolbar keeps its own choice.
|
|
50
|
+
*/
|
|
51
|
+
onDragModeChange?: (mode: ChartZoomDragMode) => void;
|
|
52
|
+
/**
|
|
53
|
+
* Whether box zoom is available at all.
|
|
54
|
+
* @default true
|
|
55
|
+
*/
|
|
56
|
+
boxZoom?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* A mode toolbar in a plot corner: Pan and Box set the drag mode, Reset returns to `bounds`.
|
|
59
|
+
* `true` for the defaults, or options.
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
62
|
+
toolbar?: boolean | ChartZoomToolbarOptions;
|
|
63
|
+
/**
|
|
64
|
+
* On a band axis, settle drags, pinches, boxes and keys on whole categories (the wheel stays
|
|
65
|
+
* continuous). Defaults to true on a band axis.
|
|
66
|
+
*/
|
|
67
|
+
snap?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Multiplies the wheel's zoom.
|
|
70
|
+
* @default 1
|
|
71
|
+
*/
|
|
72
|
+
zoomSpeed?: number;
|
|
73
|
+
/**
|
|
74
|
+
* Fraction of the view an arrow key pans (Shift: a fifth of it).
|
|
75
|
+
* @default 0.1
|
|
76
|
+
*/
|
|
77
|
+
step?: number;
|
|
78
|
+
/**
|
|
79
|
+
* How much `+` and `-` zoom per press.
|
|
80
|
+
* @default 1.25
|
|
81
|
+
*/
|
|
82
|
+
zoomStep?: number;
|
|
83
|
+
/** Take no input; the tracks still drive the chart. */
|
|
84
|
+
disabled?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Accessible name of the plot as a zoomable control.
|
|
87
|
+
* @default "zoomable plot"
|
|
88
|
+
*/
|
|
89
|
+
label?: string;
|
|
90
|
+
/** Paint order of the (invisible) gesture surface; keep it under the marks you want to hover. */
|
|
91
|
+
zIndex?: number;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* What a plain drag on a {@link chartZoom} plot does: pan, or draw a box to
|
|
95
|
+
* zoom into.
|
|
96
|
+
*
|
|
97
|
+
* @category Charts
|
|
98
|
+
*/
|
|
99
|
+
export type ChartZoomDragMode = "pan" | "box";
|
|
100
|
+
/**
|
|
101
|
+
* Options for {@link ChartZoomProps.toolbar}.
|
|
102
|
+
*
|
|
103
|
+
* @category Charts
|
|
104
|
+
*/
|
|
105
|
+
export interface ChartZoomToolbarOptions {
|
|
106
|
+
/**
|
|
107
|
+
* The plot corner the toolbar sits in.
|
|
108
|
+
* @default "top-right"
|
|
109
|
+
*/
|
|
110
|
+
corner?: "top-right" | "top-left" | "bottom-right" | "bottom-left";
|
|
111
|
+
/**
|
|
112
|
+
* The buttons' text size.
|
|
113
|
+
* @default 0.24
|
|
114
|
+
*/
|
|
115
|
+
fontSize?: number;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Zoom and pan for the `chart` it is in, by writing the range tracks the chart reads:
|
|
119
|
+
* wheel, drag, pinch, box zoom and keyboard (arrows pan, `+`/`-` zoom, `0` resets). It holds
|
|
120
|
+
* no state, so linked charts, a `rangeBrush` on the same tracks, and animations all stay
|
|
121
|
+
* in sync. Marks with tooltips drawn after it still answer hover. Which axes zoom (`x`, `y`)
|
|
122
|
+
* is read on every gesture.
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* ```ts
|
|
126
|
+
* import { derive, track } from "@sophistry/core";
|
|
127
|
+
* import { chart, chartZoom, linePlot } from "@sophistry/charts";
|
|
128
|
+
*
|
|
129
|
+
* const data = Array.from({ length: 60 }, (_, i) => Math.sin(i / 5));
|
|
130
|
+
* const from = track(0);
|
|
131
|
+
* const to = track(10);
|
|
132
|
+
* chart.create({
|
|
133
|
+
* width: 8,
|
|
134
|
+
* height: 3,
|
|
135
|
+
* xRange: derive([from, to], (a, b) => [a, b]),
|
|
136
|
+
* clip: true,
|
|
137
|
+
* children: [chartZoom.create({ x: [from, to], bounds: [0, 59] }), linePlot.create({ data })],
|
|
138
|
+
* });
|
|
139
|
+
* ```
|
|
140
|
+
*
|
|
141
|
+
* @see https://sophistry.dev/guides/charts/#multiple-views
|
|
142
|
+
* @category Charts
|
|
143
|
+
*/
|
|
144
|
+
export declare const chartZoom: import("@sophistry/core").Definition<ChartZoomProps, import("@sophistry/core/internal").CompositeNode<ChartZoomProps>, keyof ChartZoomProps>;
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Small multiples: one `chart` per category, laid out in a grid, sharing
|
|
3
|
+
* scales, one colour scale and one legend.
|
|
4
|
+
*
|
|
5
|
+
* Each panel is a `chart` inside a plain `group` that provides the panel's
|
|
6
|
+
* {@link ChartGroupScope} (its share keys and grid place); the panels and
|
|
7
|
+
* the facet meet in one {@link ChartGroup}. The facet watches the group, so
|
|
8
|
+
* a panel whose guide room or axis span changed lays the grid out again in
|
|
9
|
+
* the same commit.
|
|
10
|
+
*/
|
|
11
|
+
import type { SceneNode } from "@sophistry/core";
|
|
12
|
+
import type { BandKey, Point, Range, RangeTransition } from "@sophistry/core/geometry";
|
|
13
|
+
import type { Channel } from "../data/channels.js";
|
|
14
|
+
import type { ChartAxisOptions, ChartColorOptions, ChartSizeLegendOptions, ChartXAxisOptions, ChartYAxisOptions } from "../frame/types.js";
|
|
15
|
+
import type { LayersReveal } from "../props.js";
|
|
16
|
+
/**
|
|
17
|
+
* How a {@link facet}'s panels share their axes, for both axes or per axis: `"shared"` panels
|
|
18
|
+
* fit one range (numbers on the outer panels only), `"independent"` each fit their own; x may
|
|
19
|
+
* be `"column"` (shared down each column) and y `"row"` (shared along each row). `size` sets
|
|
20
|
+
* whether sized marks (`scatter`'s `size`) share one size scale; it is `"shared"` by default.
|
|
21
|
+
*
|
|
22
|
+
* @category Charts
|
|
23
|
+
*/
|
|
24
|
+
export type FacetScales = "shared" | "independent" | {
|
|
25
|
+
x?: "shared" | "independent" | "column";
|
|
26
|
+
y?: "shared" | "independent" | "row";
|
|
27
|
+
size?: "shared" | "independent";
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* How a {@link facet} sizes its panels along an axis: `"fixed"` (equal, or by
|
|
31
|
+
* `widths`/`heights`) or `"free"` (by the length of the panels' ranges). For both axes or per axis.
|
|
32
|
+
*
|
|
33
|
+
* @category Charts
|
|
34
|
+
*/
|
|
35
|
+
export type FacetSpace = "fixed" | "free" | {
|
|
36
|
+
x?: "fixed" | "free";
|
|
37
|
+
y?: "fixed" | "free";
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* One panel of a {@link facet}, as its `panel` builder receives it.
|
|
41
|
+
*
|
|
42
|
+
* @category Charts
|
|
43
|
+
*/
|
|
44
|
+
export interface FacetPanel<T> {
|
|
45
|
+
/** The rows of `data` in this panel. */
|
|
46
|
+
readonly data: T[];
|
|
47
|
+
/** The rows of `to` in this panel (empty when `to` has none here); undefined without `to`. */
|
|
48
|
+
readonly to: T[] | undefined;
|
|
49
|
+
/** The panel's `row` category, when faceting by rows. */
|
|
50
|
+
readonly row: BandKey | undefined;
|
|
51
|
+
/** The panel's `column` category, when faceting by columns. */
|
|
52
|
+
readonly column: BandKey | undefined;
|
|
53
|
+
/** Reading-order index (row-major). */
|
|
54
|
+
readonly index: number;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Props for {@link facet}.
|
|
58
|
+
*
|
|
59
|
+
* @category Charts
|
|
60
|
+
*/
|
|
61
|
+
export interface FacetProps<T> {
|
|
62
|
+
/** The rows, split into panels by `row` and `column`. */
|
|
63
|
+
data: readonly T[];
|
|
64
|
+
/**
|
|
65
|
+
* A keyed transition's far end, split like `data` and handed to each panel as `panel.to`.
|
|
66
|
+
* @see https://sophistry.dev/guides/chart-animation/#data-transitions
|
|
67
|
+
*/
|
|
68
|
+
to?: readonly T[];
|
|
69
|
+
/** The category that picks a panel's grid row. */
|
|
70
|
+
row?: Channel<T, BandKey>;
|
|
71
|
+
/** The category that picks a panel's grid column. */
|
|
72
|
+
column?: Channel<T, BandKey>;
|
|
73
|
+
/** The row categories, in order. Defaults to the order first seen. */
|
|
74
|
+
rows?: readonly BandKey[];
|
|
75
|
+
/** The column categories, in order. Defaults to the order first seen. */
|
|
76
|
+
columns?: readonly BandKey[];
|
|
77
|
+
/**
|
|
78
|
+
* When faceting by one variable: panels per line, filling left to right, then top to bottom.
|
|
79
|
+
* Defaults to one line.
|
|
80
|
+
*/
|
|
81
|
+
wrap?: number;
|
|
82
|
+
/** Width of the grid of plots (a right-hand legend fits inside; see `autosize`). */
|
|
83
|
+
width: number;
|
|
84
|
+
/** Height of the grid of plots. */
|
|
85
|
+
height: number;
|
|
86
|
+
/** Centre of the grid. Defaults to the origin. */
|
|
87
|
+
center?: Point;
|
|
88
|
+
/**
|
|
89
|
+
* How the panels share their axes; see {@link FacetScales}. Read once, at creation.
|
|
90
|
+
* @default "shared"
|
|
91
|
+
*/
|
|
92
|
+
scales?: FacetScales;
|
|
93
|
+
/**
|
|
94
|
+
* Relative column widths, left to right: `[2, 1]` makes the first column twice as wide. Missing
|
|
95
|
+
* or non-positive entries count as 1. Defaults to equal columns.
|
|
96
|
+
*/
|
|
97
|
+
widths?: readonly number[];
|
|
98
|
+
/** Relative row heights, top to bottom, as `widths`. */
|
|
99
|
+
heights?: readonly number[];
|
|
100
|
+
/**
|
|
101
|
+
* `"free"` sizes columns by their panels' x ranges and rows by their y ranges (or per axis), so
|
|
102
|
+
* one band or unit is equally long in every panel. Pair with `scales: { x: "column" }` for
|
|
103
|
+
* exact sizing. `widths`/`heights` win.
|
|
104
|
+
* @default "fixed"
|
|
105
|
+
*/
|
|
106
|
+
space?: FacetSpace;
|
|
107
|
+
/**
|
|
108
|
+
* Space between neighbouring panels, beyond their titles and numbers. Defaults to 0.55 across,
|
|
109
|
+
* 0.25 down.
|
|
110
|
+
*/
|
|
111
|
+
gap?: number | {
|
|
112
|
+
x?: number;
|
|
113
|
+
y?: number;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* As `chart`'s `autosize`, over the whole grid: `"fit"` fits legend, colour bar and right-hand
|
|
117
|
+
* numbers inside `width`; `"contain"` fits everything inside `width × height`; `"pad"` makes
|
|
118
|
+
* the grid of plots exactly `width × height`.
|
|
119
|
+
* @default "fit"
|
|
120
|
+
*/
|
|
121
|
+
autosize?: "fit" | "pad" | "contain";
|
|
122
|
+
/**
|
|
123
|
+
* Each panel's title, as a function of the panel, or `false` for none. Defaults to its category
|
|
124
|
+
* (`"row · column"`, or the column only when rows are titled in the margin).
|
|
125
|
+
*/
|
|
126
|
+
panelTitle?: ((panel: FacetPanel<T>) => string) | false;
|
|
127
|
+
/**
|
|
128
|
+
* Font size of the panel and row titles.
|
|
129
|
+
* @default 0.3
|
|
130
|
+
*/
|
|
131
|
+
panelTitleFontSize?: number;
|
|
132
|
+
/**
|
|
133
|
+
* When faceting by `row` (without `wrap`): write each row's category once in the right margin
|
|
134
|
+
* and the column categories above the top row only. `false` titles every panel `"row ·
|
|
135
|
+
* column"`.
|
|
136
|
+
* @default true
|
|
137
|
+
*/
|
|
138
|
+
marginTitles?: boolean;
|
|
139
|
+
/** A row's title in the margin. Defaults to `String(row)`. */
|
|
140
|
+
rowTitle?: (row: BandKey, index: number) => string;
|
|
141
|
+
/** Fixed x range for every panel, or a `{ from, to, t }` transition. Omitted, fitted. */
|
|
142
|
+
xRange?: Range | RangeTransition;
|
|
143
|
+
/** Fixed y range for every panel. */
|
|
144
|
+
yRange?: Range | RangeTransition;
|
|
145
|
+
/** As `chart`'s `axis`, for every panel. */
|
|
146
|
+
axis?: ChartAxisOptions;
|
|
147
|
+
/** As `chart`'s `xAxis`, for every panel. */
|
|
148
|
+
xAxis?: ChartXAxisOptions;
|
|
149
|
+
/** As `chart`'s `yAxis`, for every panel. */
|
|
150
|
+
yAxis?: ChartYAxisOptions;
|
|
151
|
+
/** As `chart`'s `grid`, for every panel. */
|
|
152
|
+
grid?: boolean | "x" | "y";
|
|
153
|
+
gridColor?: string;
|
|
154
|
+
/** As `chart`'s `clip`, for every panel. */
|
|
155
|
+
clip?: boolean;
|
|
156
|
+
/** As `chart`'s `reveal`, for every panel. */
|
|
157
|
+
reveal?: LayersReveal;
|
|
158
|
+
tip?: boolean;
|
|
159
|
+
/** The shared colour scale: order, colours and legend names. */
|
|
160
|
+
color?: ChartColorOptions;
|
|
161
|
+
/**
|
|
162
|
+
* One legend for every panel: on the right (`true`, `"right"`) or in a row over the grid
|
|
163
|
+
* (`"top"`). `false` never draws one. On the right by default whenever a layer reports a
|
|
164
|
+
* series.
|
|
165
|
+
*/
|
|
166
|
+
legend?: boolean | "right" | "top";
|
|
167
|
+
legendTitle?: string;
|
|
168
|
+
legendFontSize?: number;
|
|
169
|
+
/**
|
|
170
|
+
* Size keys shared by every panel, for layers sized by value (`scatter`'s `size`), placed with
|
|
171
|
+
* the legend as `chart`'s `sizeLegend`. Drawn only while the panels share a size scale. `false`
|
|
172
|
+
* hides them; an object sets title, values and format.
|
|
173
|
+
* @default true
|
|
174
|
+
*/
|
|
175
|
+
sizeLegend?: boolean | ChartSizeLegendOptions;
|
|
176
|
+
/**
|
|
177
|
+
* One colour bar for every panel, from the first value-coloured layer.
|
|
178
|
+
* @default false
|
|
179
|
+
*/
|
|
180
|
+
colorbar?: boolean;
|
|
181
|
+
colorbarLabel?: string;
|
|
182
|
+
/** A title over the grid. */
|
|
183
|
+
title?: string;
|
|
184
|
+
titleFontSize?: number;
|
|
185
|
+
/** One x-axis title, centred under the grid. */
|
|
186
|
+
xLabel?: string;
|
|
187
|
+
/** One y-axis title, centred left of the grid, reading upward. */
|
|
188
|
+
yLabel?: string;
|
|
189
|
+
axisLabelFontSize?: number;
|
|
190
|
+
/**
|
|
191
|
+
* Reveal, 0..1: every panel draws its frame, then its data; the legend, size key and colour bar
|
|
192
|
+
* come last.
|
|
193
|
+
* @see https://sophistry.dev/guides/chart-animation/#reveals
|
|
194
|
+
*/
|
|
195
|
+
progress?: number;
|
|
196
|
+
/**
|
|
197
|
+
* Fraction of the data reveal spent staggering panels in reading order, 0..0.95.
|
|
198
|
+
* @default 0
|
|
199
|
+
*/
|
|
200
|
+
stagger?: number;
|
|
201
|
+
zIndex?: number;
|
|
202
|
+
visible?: boolean;
|
|
203
|
+
/**
|
|
204
|
+
* Draws one panel's layers: called with the panel when it is
|
|
205
|
+
* made, and again when its rows change, returning the layer nodes (`scatter.create(...)`).
|
|
206
|
+
* A plain value prop: the bindings pass the function through untouched, so in Solid or React
|
|
207
|
+
* give it a function returning nodes made with the definitions' `create`.
|
|
208
|
+
*/
|
|
209
|
+
panel: (panel: FacetPanel<T>) => readonly SceneNode[];
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Small multiples: `data` split by `row` and/or `column`, one `chart` per panel whose layers
|
|
213
|
+
* `panel(info)` builds. Panels share scales by default (see `scales`), one colour scale and one
|
|
214
|
+
* legend, so they compare directly.
|
|
215
|
+
*
|
|
216
|
+
* @example
|
|
217
|
+
* ```ts
|
|
218
|
+
* import { facet, scatter } from "@sophistry/charts";
|
|
219
|
+
*
|
|
220
|
+
* const rows = [
|
|
221
|
+
* { site: "coast", temp: 14, rain: 80 },
|
|
222
|
+
* { site: "coast", temp: 18, rain: 60 },
|
|
223
|
+
* { site: "hills", temp: 9, rain: 120 },
|
|
224
|
+
* { site: "hills", temp: 13, rain: 95 },
|
|
225
|
+
* ];
|
|
226
|
+
* facet.create({
|
|
227
|
+
* data: rows,
|
|
228
|
+
* column: "site",
|
|
229
|
+
* width: 9,
|
|
230
|
+
* height: 3,
|
|
231
|
+
* panel: (panel) => [scatter.create({ data: panel.data, x: "temp", y: "rain" })],
|
|
232
|
+
* });
|
|
233
|
+
* ```
|
|
234
|
+
*
|
|
235
|
+
* @see https://sophistry.dev/guides/charts/#multiple-views
|
|
236
|
+
* @category Charts
|
|
237
|
+
*/
|
|
238
|
+
export declare const facet: import("@sophistry/core").Definition<FacetProps<any>, import("@sophistry/core/internal").CompositeNode<FacetProps<any>>, keyof FacetProps<any>>;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The guides a group of panels draws once for all of them (title, outer
|
|
3
|
+
* axis titles, one legend, size keys, one colour bar) and the room they
|
|
4
|
+
* take. Internal: used by `facet`, `pairPlot` and `jointPlot`.
|
|
5
|
+
*
|
|
6
|
+
* {@link createGroupGuides} is made once in the preset's `setup`; each
|
|
7
|
+
* update calls `measure(...)` (the room, read before laying the grid out)
|
|
8
|
+
* and then `draw(...)` (the nodes, placed around the laid-out grid). Nodes
|
|
9
|
+
* are kept by role, so updates write props instead of rebuilding.
|
|
10
|
+
*/
|
|
11
|
+
import type { SceneNode } from "@sophistry/core";
|
|
12
|
+
import type { Bounds, Point } from "@sophistry/core/geometry";
|
|
13
|
+
import type { Theme } from "@sophistry/core/themes";
|
|
14
|
+
import type { ChartSizeLegendOptions, RampExtent, SizeExtent } from "../frame/types.js";
|
|
15
|
+
import type { SizeKeysEnds } from "../guides/size-legend.js";
|
|
16
|
+
import type { SideRoom } from "../math/facet.js";
|
|
17
|
+
import type { ChartGroup } from "./chart-group.js";
|
|
18
|
+
/** Where a group's panels' share of `progress` ends when a legend or colour bar follows. */
|
|
19
|
+
export declare const PANELS_END_WITH_GUIDES = 0.9;
|
|
20
|
+
/** What a group draws once, and how. */
|
|
21
|
+
export interface GroupGuideOptions {
|
|
22
|
+
title?: string;
|
|
23
|
+
titleFontSize?: number;
|
|
24
|
+
/** One title under the grid, centred. */
|
|
25
|
+
xLabel?: string;
|
|
26
|
+
/** One title left of the grid, centred and turned to read upward. */
|
|
27
|
+
yLabel?: string;
|
|
28
|
+
axisLabelFontSize?: number;
|
|
29
|
+
/** Draw the shared legend (when a layer reports a series): on the right (`true`, `"right"`) or in a row over the grid (`"top"`). */
|
|
30
|
+
legend?: boolean | "right" | "top";
|
|
31
|
+
/** How wide a top legend's row may run before it wraps: the grid's footprint. */
|
|
32
|
+
legendWidth?: number;
|
|
33
|
+
legendTitle?: string;
|
|
34
|
+
legendFontSize?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Size keys for layers that size marks by value, one per distinct
|
|
37
|
+
* `sizeRange`, drawn with the legend. A key is drawn only when every
|
|
38
|
+
* panel's layers on that range share one scale. `false` (or
|
|
39
|
+
* `legend: false`) hides them; an object tunes them as `chart`'s `sizeLegend`.
|
|
40
|
+
* @default true
|
|
41
|
+
*/
|
|
42
|
+
sizeLegend?: boolean | ChartSizeLegendOptions;
|
|
43
|
+
/** How tall the keys on the right may stack before the size key moves beside the legend. */
|
|
44
|
+
keysHeight?: number;
|
|
45
|
+
/** Draw one colour bar from the first value-coloured layer. */
|
|
46
|
+
colorbar?: boolean;
|
|
47
|
+
colorbarLabel?: string;
|
|
48
|
+
}
|
|
49
|
+
/** What `measure` works out: the room, and what `draw` places. */
|
|
50
|
+
export interface GroupGuideMeasure {
|
|
51
|
+
/** The room the group's own guides take outside the panels' guides, per side. */
|
|
52
|
+
room: SideRoom;
|
|
53
|
+
/** The room above and below the grid alone (top legend, title, x title). */
|
|
54
|
+
vertical: {
|
|
55
|
+
top: number;
|
|
56
|
+
bottom: number;
|
|
57
|
+
};
|
|
58
|
+
/** Whether a legend, size key or colour bar comes last in the reveal. */
|
|
59
|
+
guided: boolean;
|
|
60
|
+
legendShown: boolean;
|
|
61
|
+
legendTop: boolean;
|
|
62
|
+
legendSize: {
|
|
63
|
+
width: number;
|
|
64
|
+
height: number;
|
|
65
|
+
} | undefined;
|
|
66
|
+
sizeKeys: readonly SizeExtent[];
|
|
67
|
+
size: SizeKeysEnds | undefined;
|
|
68
|
+
/** The legend and size key placed together, as `chart` places them. */
|
|
69
|
+
keys: {
|
|
70
|
+
width: number;
|
|
71
|
+
height: number;
|
|
72
|
+
presence: number;
|
|
73
|
+
sizeAt: Point;
|
|
74
|
+
} | undefined;
|
|
75
|
+
ramp: RampExtent | undefined;
|
|
76
|
+
labelSize: number;
|
|
77
|
+
}
|
|
78
|
+
/** Where `draw` places the guides. */
|
|
79
|
+
export interface GroupGuidePlacement {
|
|
80
|
+
/** The box around every panel's plotting area. */
|
|
81
|
+
plots: Bounds;
|
|
82
|
+
/** The room the panels' own guides take around that box. */
|
|
83
|
+
panelRoom: SideRoom;
|
|
84
|
+
/** The box the axis titles centre on, when not all of `plots` (a joint plot's main panel). */
|
|
85
|
+
labelBox?: Bounds;
|
|
86
|
+
frameProgress: number;
|
|
87
|
+
legendProgress: number;
|
|
88
|
+
zIndex?: number;
|
|
89
|
+
visible?: boolean;
|
|
90
|
+
}
|
|
91
|
+
/** A group's guides: measure, then draw. */
|
|
92
|
+
export interface GroupGuides {
|
|
93
|
+
measure(group: ChartGroup, options: GroupGuideOptions, theme: Theme): GroupGuideMeasure;
|
|
94
|
+
draw(group: ChartGroup, options: GroupGuideOptions, measured: GroupGuideMeasure, at: GroupGuidePlacement, theme: Theme): SceneNode[];
|
|
95
|
+
/** Disposes the nodes it keeps. */
|
|
96
|
+
dispose(): void;
|
|
97
|
+
}
|
|
98
|
+
/** Makes a group's guides. Call once, in the preset's `setup`. */
|
|
99
|
+
export declare function createGroupGuides(): GroupGuides;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Family barrel: multiview. Owned by its family; re-exported from the package entry. */
|
|
2
|
+
export type { BrushAxis, BrushCell, ChartZoomBox } from "./brush.js";
|
|
3
|
+
export { boxBrushDrags, brushDrags, brushWheel, chartZoomActions, chartZoomDrag, } from "./brush.js";
|
|
4
|
+
export type { ChartGroup, ChartGroupOptions, ChartGroupScope, ChartPanel, GroupMember, GroupPanel, PanelKeys, PanelPlace, PanelRoom, PanelState, } from "./chart-group.js";
|
|
5
|
+
export { chartGroupContext, chartPanel, createChartGroup, } from "./chart-group.js";
|
|
6
|
+
export type { BrushAxisOption, ChartLinkProps, RangeBrushProps, } from "./chart-link.js";
|
|
7
|
+
export { brushedCategories, chartLink, rangeBrush } from "./chart-link.js";
|
|
8
|
+
export type { ChartZoomDragMode, ChartZoomProps, ChartZoomToolbarOptions, } from "./chart-zoom.js";
|
|
9
|
+
export { chartZoom } from "./chart-zoom.js";
|
|
10
|
+
export type { FacetPanel, FacetProps, FacetScales, FacetSpace, } from "./facet.js";
|
|
11
|
+
export { facet } from "./facet.js";
|
|
12
|
+
export type { JointPlotProps } from "./joint-plot.js";
|
|
13
|
+
export { jointPlot } from "./joint-plot.js";
|
|
14
|
+
export type { PairPanel, PairPlotProps } from "./pair-plot.js";
|
|
15
|
+
export { pairPlot } from "./pair-plot.js";
|
|
16
|
+
export type { ParallelAxis, ParallelCoordinatesProps, } from "./parallel-coordinates.js";
|
|
17
|
+
export { parallelCoordinates } from "./parallel-coordinates.js";
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A scatter with each variable's distribution along its edge, as three
|
|
3
|
+
* linked `chart`s in one group: the marginals follow the scatter's fit
|
|
4
|
+
* without adding their tails to it.
|
|
5
|
+
*/
|
|
6
|
+
import type { SceneNode } from "@sophistry/core";
|
|
7
|
+
import type { BandKey, Point, Range, RangeTransition } from "@sophistry/core/geometry";
|
|
8
|
+
import type { Channel } from "../data/channels.js";
|
|
9
|
+
import type { ChartColorOptions, ChartXAxisOptions, ChartYAxisOptions } from "../frame/types.js";
|
|
10
|
+
/**
|
|
11
|
+
* Props for {@link jointPlot}.
|
|
12
|
+
*
|
|
13
|
+
* @category Charts
|
|
14
|
+
*/
|
|
15
|
+
export interface JointPlotProps<T> {
|
|
16
|
+
/** One point per datum. */
|
|
17
|
+
data: readonly T[];
|
|
18
|
+
/** The horizontal variable. */
|
|
19
|
+
x: Channel<T, number>;
|
|
20
|
+
/** The vertical variable. */
|
|
21
|
+
y: Channel<T, number>;
|
|
22
|
+
/** Splits the points and the marginal densities by category, one colour each. */
|
|
23
|
+
series?: Channel<T, BandKey>;
|
|
24
|
+
/** The scatter's identity channel, as `scatter`'s `key`. */
|
|
25
|
+
key?: Channel<T, BandKey>;
|
|
26
|
+
/** Width of the main plot and its right marginal (a legend fits inside; see `autosize`). */
|
|
27
|
+
width: number;
|
|
28
|
+
/** Height of the main plot and its top marginal. */
|
|
29
|
+
height: number;
|
|
30
|
+
/** Centre of the figure. Defaults to the origin. */
|
|
31
|
+
center?: Point;
|
|
32
|
+
/**
|
|
33
|
+
* How much larger the main plot is than a marginal, along their shared axis.
|
|
34
|
+
* @default 5
|
|
35
|
+
*/
|
|
36
|
+
ratio?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Gap between the main plot and each marginal.
|
|
39
|
+
* @default 0.15
|
|
40
|
+
*/
|
|
41
|
+
space?: number;
|
|
42
|
+
/**
|
|
43
|
+
* What the marginals draw: `"density"` (split by `series`, normalised together) or
|
|
44
|
+
* `"histogram"` (bins of the whole sample).
|
|
45
|
+
* @default "density"
|
|
46
|
+
*/
|
|
47
|
+
marginal?: "density" | "histogram";
|
|
48
|
+
/** Histogram marginals: how many bins. Defaults to `histogramBins`' rule. */
|
|
49
|
+
binCount?: number;
|
|
50
|
+
/**
|
|
51
|
+
* Density marginals: normalise all series together, so each curve's area is its share of the
|
|
52
|
+
* sample.
|
|
53
|
+
* @default true
|
|
54
|
+
*/
|
|
55
|
+
commonNorm?: boolean;
|
|
56
|
+
/** Marker radius. Defaults to `scatter`'s. */
|
|
57
|
+
radius?: number;
|
|
58
|
+
/** Fixed x range, shared by the scatter and the top marginal. Omitted, fitted to the points. */
|
|
59
|
+
xRange?: Range | RangeTransition;
|
|
60
|
+
/** Fixed y range, shared by the scatter and the right marginal. */
|
|
61
|
+
yRange?: Range | RangeTransition;
|
|
62
|
+
/** The main plot's x axis. */
|
|
63
|
+
xAxis?: ChartXAxisOptions;
|
|
64
|
+
/** The main plot's y axis. */
|
|
65
|
+
yAxis?: ChartYAxisOptions;
|
|
66
|
+
/** The main plot's grid. */
|
|
67
|
+
grid?: boolean | "x" | "y";
|
|
68
|
+
/**
|
|
69
|
+
* As `chart`'s `autosize`, over the whole figure.
|
|
70
|
+
* @default "fit"
|
|
71
|
+
*/
|
|
72
|
+
autosize?: "fit" | "pad" | "contain";
|
|
73
|
+
color?: ChartColorOptions;
|
|
74
|
+
/**
|
|
75
|
+
* One legend: on the right (`true`, `"right"`) or in a row over the figure (`"top"`).
|
|
76
|
+
* On the right by default when `series` is given.
|
|
77
|
+
*/
|
|
78
|
+
legend?: boolean | "right" | "top";
|
|
79
|
+
legendTitle?: string;
|
|
80
|
+
legendFontSize?: number;
|
|
81
|
+
title?: string;
|
|
82
|
+
titleFontSize?: number;
|
|
83
|
+
/** The x variable's title, centred under the main plot. */
|
|
84
|
+
xLabel?: string;
|
|
85
|
+
/** The y variable's title, centred left of the main plot, reading upward. */
|
|
86
|
+
yLabel?: string;
|
|
87
|
+
axisLabelFontSize?: number;
|
|
88
|
+
/**
|
|
89
|
+
* Reveal, 0..1: every frame, then the points and both marginals together, then the legend.
|
|
90
|
+
* @see https://sophistry.dev/guides/chart-animation/#reveals
|
|
91
|
+
*/
|
|
92
|
+
progress?: number;
|
|
93
|
+
zIndex?: number;
|
|
94
|
+
visible?: boolean;
|
|
95
|
+
/** More layers on the main plot (a regression line, annotations). */
|
|
96
|
+
children?: readonly SceneNode[];
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* A joint plot: a scatter of `x` against `y` with each variable's distribution along the
|
|
100
|
+
* matching edge (`x`'s above, `y`'s on the right). The marginals share the scatter's scales,
|
|
101
|
+
* and a `series` is one colour in all three panels with one legend.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```ts
|
|
105
|
+
* import { jointPlot } from "@sophistry/charts";
|
|
106
|
+
*
|
|
107
|
+
* const points = Array.from({ length: 100 }, (_, i) => ({ x: Math.sin(i), y: Math.cos(i * 1.3), g: i % 2 ? "a" : "b" }));
|
|
108
|
+
* jointPlot.create({ data: points, x: "x", y: "y", series: "g", width: 7, height: 6 });
|
|
109
|
+
* ```
|
|
110
|
+
*
|
|
111
|
+
* @see https://sophistry.dev/guides/charts/#multiple-views
|
|
112
|
+
* @category Charts
|
|
113
|
+
*/
|
|
114
|
+
export declare const jointPlot: import("@sophistry/core").Definition<JointPlotProps<any>, import("@sophistry/core/internal").CompositeNode<JointPlotProps<any>>, keyof JointPlotProps<any>>;
|