panelui-native 0.62.0 → 0.63.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/lib/module/components/area-chart/index.js +14 -4
- package/lib/module/components/area-chart/index.js.map +1 -1
- package/lib/module/components/bar-chart/index.js +14 -4
- package/lib/module/components/bar-chart/index.js.map +1 -1
- package/lib/module/components/candlestick-chart/index.js +14 -4
- package/lib/module/components/candlestick-chart/index.js.map +1 -1
- package/lib/module/components/card/index.js +26 -1
- package/lib/module/components/card/index.js.map +1 -1
- package/lib/module/components/dialog/index.js +49 -3
- package/lib/module/components/dialog/index.js.map +1 -1
- package/lib/module/components/hex-chart/index.js +2 -2
- package/lib/module/components/hex-chart/index.js.map +1 -1
- package/lib/module/components/line-chart/index.js +14 -4
- package/lib/module/components/line-chart/index.js.map +1 -1
- package/lib/module/components/pie-chart/index.js +2 -2
- package/lib/module/components/pie-chart/index.js.map +1 -1
- package/lib/module/components/plot/index.js +1329 -0
- package/lib/module/components/plot/index.js.map +1 -0
- package/lib/module/components/polar-area-chart/index.js +2 -2
- package/lib/module/components/polar-area-chart/index.js.map +1 -1
- package/lib/module/components/radar-chart/index.js +14 -4
- package/lib/module/components/radar-chart/index.js.map +1 -1
- package/lib/module/components/ring-chart/index.js +2 -2
- package/lib/module/components/ring-chart/index.js.map +1 -1
- package/lib/module/components/section-rail/index.js +120 -15
- package/lib/module/components/section-rail/index.js.map +1 -1
- package/lib/module/components/selection-mode/index.js +129 -18
- package/lib/module/components/selection-mode/index.js.map +1 -1
- package/lib/module/components/sortable/index.js +15 -5
- package/lib/module/components/sortable/index.js.map +1 -1
- package/lib/module/index.js +7 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/components/area-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/bar-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/candlestick-chart/index.d.ts +6 -3
- package/lib/typescript/src/components/candlestick-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/card/index.d.ts +48 -1
- package/lib/typescript/src/components/card/index.d.ts.map +1 -1
- package/lib/typescript/src/components/dialog/index.d.ts +47 -2
- package/lib/typescript/src/components/dialog/index.d.ts.map +1 -1
- package/lib/typescript/src/components/line-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/plot/index.d.ts +471 -0
- package/lib/typescript/src/components/plot/index.d.ts.map +1 -0
- package/lib/typescript/src/components/radar-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/section-rail/index.d.ts +8 -1
- package/lib/typescript/src/components/section-rail/index.d.ts.map +1 -1
- package/lib/typescript/src/components/selection-mode/index.d.ts +82 -6
- package/lib/typescript/src/components/selection-mode/index.d.ts.map +1 -1
- package/lib/typescript/src/components/sortable/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/area-chart/index.tsx +14 -4
- package/src/components/bar-chart/index.tsx +14 -4
- package/src/components/candlestick-chart/index.tsx +20 -7
- package/src/components/card/index.tsx +32 -7
- package/src/components/dialog/index.tsx +55 -2
- package/src/components/hex-chart/index.tsx +2 -2
- package/src/components/line-chart/index.tsx +14 -4
- package/src/components/pie-chart/index.tsx +2 -2
- package/src/components/plot/index.tsx +1564 -0
- package/src/components/polar-area-chart/index.tsx +2 -2
- package/src/components/radar-chart/index.tsx +14 -4
- package/src/components/ring-chart/index.tsx +2 -2
- package/src/components/section-rail/index.tsx +133 -14
- package/src/components/selection-mode/index.tsx +163 -26
- package/src/components/sortable/index.tsx +15 -5
- package/src/index.ts +46 -0
- package/theme.css +24 -0
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plot — a chart you assemble, for the chart that is not in the box.
|
|
3
|
+
*
|
|
4
|
+
* The other charts in this library each answer one question and answer it
|
|
5
|
+
* completely: a line chart knows it is drawing a series over time, and every
|
|
6
|
+
* decision inside it follows from that. This one knows nothing. It measures a
|
|
7
|
+
* box, resolves a scale, and hands both to whatever marks you put in it — so a
|
|
8
|
+
* combination nothing here ships as its own component is still a chart you can
|
|
9
|
+
* build rather than a chart you have to go without.
|
|
10
|
+
*
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <Plot data={months} xDataKey="month">
|
|
13
|
+
* <Plot.Grid />
|
|
14
|
+
* <Plot.Bars dataKey="orders" colorIndex={2} />
|
|
15
|
+
* <Plot.Line dataKey="revenue" />
|
|
16
|
+
* <Plot.YAxis />
|
|
17
|
+
* <Plot.XAxis />
|
|
18
|
+
* <Plot.Cursor />
|
|
19
|
+
* <Plot.Tooltip />
|
|
20
|
+
* </Plot>
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* ## One scale, however many marks
|
|
24
|
+
*
|
|
25
|
+
* Every mark reads the same plot box and the same y-domain, and the domain is
|
|
26
|
+
* derived from all of them together. That is the whole reason to compose rather
|
|
27
|
+
* than to stack two charts on top of each other: two scales drawn over each
|
|
28
|
+
* other look like a comparison and are not one.
|
|
29
|
+
*
|
|
30
|
+
* ## Where your own marks go
|
|
31
|
+
*
|
|
32
|
+
* `Plot.Layer` drops its children into the SVG tree, and `usePlot()` gives them
|
|
33
|
+
* the resolved geometry — the box, the tweening domain, the reveal, the palette.
|
|
34
|
+
* The scale functions are worklets exported alongside this component, so a mark
|
|
35
|
+
* of your own is rebuilt on the UI thread on the same frames these are:
|
|
36
|
+
*
|
|
37
|
+
* ```tsx
|
|
38
|
+
* function Threshold({ value }: { value: number }) {
|
|
39
|
+
* const { plot, domainMin, domainMax } = usePlot();
|
|
40
|
+
* const props = useAnimatedProps(() => {
|
|
41
|
+
* const y = yOf(value, plot, domainMin.value, domainMax.value);
|
|
42
|
+
* return { d: `M${plot.left},${y}H${plot.left + plot.width}` };
|
|
43
|
+
* });
|
|
44
|
+
* return <AnimatedPath animatedProps={props} stroke="red" />;
|
|
45
|
+
* }
|
|
46
|
+
*
|
|
47
|
+
* <Plot data={rows}>
|
|
48
|
+
* <Plot.Layer><Threshold value={80} /></Plot.Layer>
|
|
49
|
+
* </Plot>
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* Anything that is text or takes a touch goes in `Plot.Overlay` instead, which
|
|
53
|
+
* is a React Native view over the drawing. That split is not a preference: SVG
|
|
54
|
+
* text ignores the platform's text scaling and the theme's font, and a gesture
|
|
55
|
+
* handler cannot be attached to an SVG node at all.
|
|
56
|
+
*
|
|
57
|
+
* ## What it will not do for you
|
|
58
|
+
*
|
|
59
|
+
* There is no `type` prop and no set of defaults that guess at one. A chart
|
|
60
|
+
* assembled here is exactly the marks you wrote, in the order you wrote them —
|
|
61
|
+
* which is also the order they are drawn in, so a line over bars is a line
|
|
62
|
+
* written after them.
|
|
63
|
+
*/
|
|
64
|
+
import { type ReactNode } from 'react';
|
|
65
|
+
import { type ViewProps } from 'react-native';
|
|
66
|
+
import { type SharedValue } from 'react-native-reanimated';
|
|
67
|
+
import { type Plot as PlotBox } from '../../utils/chart.js';
|
|
68
|
+
export { areaPath, bandOf, barPath, compactNumber, linePath, segment, xAt, xOf, yOf, } from '../../utils/chart.js';
|
|
69
|
+
export type { Plot as PlotBox, ChartPoint } from '../../utils/chart.js';
|
|
70
|
+
/**
|
|
71
|
+
* Which layer a part belongs to. Read off the component itself, so composition
|
|
72
|
+
* stays a flat list of children instead of three nested slots whose order the
|
|
73
|
+
* caller has to remember.
|
|
74
|
+
*/
|
|
75
|
+
type Layer = 'svg' | 'overlay' | 'header';
|
|
76
|
+
export type PlotStatus = 'loading' | 'ready';
|
|
77
|
+
export type PlotCurve = 'monotone' | 'linear';
|
|
78
|
+
export type PlotDatum = Record<string, string | number | null | undefined>;
|
|
79
|
+
/**
|
|
80
|
+
* How the index of a row becomes an x.
|
|
81
|
+
*
|
|
82
|
+
* `point` puts the first and last rows on the plot's own edges, which is what a
|
|
83
|
+
* series wants — the line should reach the frame. `band` gives every row an
|
|
84
|
+
* equal slice and centres it in the middle of that, which is what anything with
|
|
85
|
+
* width wants: a bar sitting on the edge of the plot is a bar half of which is
|
|
86
|
+
* outside it.
|
|
87
|
+
*
|
|
88
|
+
* Resolved from the marks by default, so a chart with bars in it is banded
|
|
89
|
+
* without being told.
|
|
90
|
+
*/
|
|
91
|
+
export type PlotScale = 'point' | 'band';
|
|
92
|
+
/** One end of the y-domain: a number to pin it at, or `auto` to derive it. */
|
|
93
|
+
export type PlotBound = number | 'auto';
|
|
94
|
+
/** Everything a mark needs to draw itself. Read it with `usePlot()`. */
|
|
95
|
+
export interface PlotGeometry {
|
|
96
|
+
/** The rows, in order. */
|
|
97
|
+
data: PlotDatum[];
|
|
98
|
+
/** Key holding the x label. */
|
|
99
|
+
xDataKey: string;
|
|
100
|
+
/** The drawable box, after the padding and any axis gutter are taken off. */
|
|
101
|
+
plot: PlotBox;
|
|
102
|
+
/** How an index becomes an x. */
|
|
103
|
+
xScale: PlotScale;
|
|
104
|
+
/** `loading` draws nothing but the frame. */
|
|
105
|
+
status: PlotStatus;
|
|
106
|
+
/**
|
|
107
|
+
* The y-domain, tweened. Read these inside worklets — they are what makes a
|
|
108
|
+
* chart whose numbers changed redraw against a moving axis rather than jump.
|
|
109
|
+
*/
|
|
110
|
+
domainMin: SharedValue<number>;
|
|
111
|
+
domainMax: SharedValue<number>;
|
|
112
|
+
/**
|
|
113
|
+
* The domain the tween is heading for. Labels read this rather than the shared
|
|
114
|
+
* values: a number re-rendered on every frame of a tween is thirty renders of
|
|
115
|
+
* a label that lands on the string it started on.
|
|
116
|
+
*/
|
|
117
|
+
extent: [number, number];
|
|
118
|
+
/** `0` to `1` as the plot is uncovered on mount. */
|
|
119
|
+
reveal: SharedValue<number>;
|
|
120
|
+
/** The five theme series colours, in order of prominence. */
|
|
121
|
+
palette: string[];
|
|
122
|
+
/** Every mark that registered itself, as `[dataKey, colour]`. */
|
|
123
|
+
series: [string, string][];
|
|
124
|
+
registerSeries: (key: string, color: string) => void;
|
|
125
|
+
unregisterSeries: (key: string) => void;
|
|
126
|
+
/** Row under the cursor, or `-1`. On the UI thread. */
|
|
127
|
+
activeIndex: SharedValue<number>;
|
|
128
|
+
/** The same index on the JS thread, for anything that has to re-render. */
|
|
129
|
+
activeIndexJS: number;
|
|
130
|
+
setActiveIndexJS: (index: number) => void;
|
|
131
|
+
/** The clip every mark shares, so they are revealed as one drawing. */
|
|
132
|
+
clipId: string;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* The resolved geometry, for a mark of your own.
|
|
136
|
+
*
|
|
137
|
+
* Everything in it is either a plain number that changes on layout or a shared
|
|
138
|
+
* value that changes every frame, so a mark built from it animates with the
|
|
139
|
+
* rest of the chart rather than beside it.
|
|
140
|
+
*/
|
|
141
|
+
export declare function usePlot(): PlotGeometry;
|
|
142
|
+
/** The row under the cursor, for a readout drawn inside the plot. */
|
|
143
|
+
export declare function usePlotCursor(): {
|
|
144
|
+
activeIndex: number;
|
|
145
|
+
activePoint: PlotDatum | null;
|
|
146
|
+
};
|
|
147
|
+
export interface PlotProps extends ViewProps {
|
|
148
|
+
className?: string;
|
|
149
|
+
/** The rows. Each one is a position along the x-axis. */
|
|
150
|
+
data: PlotDatum[];
|
|
151
|
+
/** Key holding the x label. Used by the axis and the readout. */
|
|
152
|
+
xDataKey?: string;
|
|
153
|
+
/**
|
|
154
|
+
* `loading` draws the frame and nothing in it, and reveals the marks when it
|
|
155
|
+
* turns `ready`. One component throughout rather than a spinner swapped for a
|
|
156
|
+
* chart — swapping loses the transition.
|
|
157
|
+
*/
|
|
158
|
+
status?: PlotStatus;
|
|
159
|
+
/** Width ÷ height. `2` is the wide card shape; `1.6` suits a narrow column. */
|
|
160
|
+
aspectRatio?: number;
|
|
161
|
+
/** Milliseconds for the plot to be uncovered on mount. */
|
|
162
|
+
animationDuration?: number;
|
|
163
|
+
/** Milliseconds for the y-axis to settle after the data changes. */
|
|
164
|
+
domainDuration?: number;
|
|
165
|
+
/**
|
|
166
|
+
* The y-domain, as `[low, high]`. Either end may be a number to pin it there
|
|
167
|
+
* or `auto` to take it from the data.
|
|
168
|
+
*
|
|
169
|
+
* Pinning one end is the case this exists for: `[0, 'auto']` keeps the
|
|
170
|
+
* baseline at zero, which a chart of lengths needs — a bar cropped at the
|
|
171
|
+
* bottom is a length that lies — while still letting the top follow whatever
|
|
172
|
+
* arrives.
|
|
173
|
+
*/
|
|
174
|
+
yDomain?: [PlotBound, PlotBound];
|
|
175
|
+
/**
|
|
176
|
+
* How an index becomes an x. Derived from the marks when left out: a plot
|
|
177
|
+
* with bars in it is banded, and anything else is on points.
|
|
178
|
+
*/
|
|
179
|
+
xScale?: PlotScale;
|
|
180
|
+
/** How series are joined between points, unless a mark overrides it. */
|
|
181
|
+
curve?: PlotCurve;
|
|
182
|
+
/**
|
|
183
|
+
* The row under the cursor as it moves, and `-1`/`null` when the finger
|
|
184
|
+
* lifts. This is how a readout *outside* the plot gets its value — that
|
|
185
|
+
* header is not inside this provider, so it cannot use `usePlotCursor`.
|
|
186
|
+
*/
|
|
187
|
+
onActiveIndexChange?: (index: number, datum: PlotDatum | null) => void;
|
|
188
|
+
/**
|
|
189
|
+
* Drop the padding so the marks reach the edges — for a plot with no axis,
|
|
190
|
+
* grid or cursor, where the shape is the whole point.
|
|
191
|
+
*/
|
|
192
|
+
compact?: boolean;
|
|
193
|
+
children?: ReactNode;
|
|
194
|
+
}
|
|
195
|
+
/** Imperative handle: re-run the reveal, for a "replay" control. */
|
|
196
|
+
export interface PlotHandle {
|
|
197
|
+
replay: () => void;
|
|
198
|
+
}
|
|
199
|
+
export interface PlotGridProps {
|
|
200
|
+
/** Horizontal rules across the plot. */
|
|
201
|
+
rows?: number;
|
|
202
|
+
color?: string;
|
|
203
|
+
/** Dash pattern, e.g. `"4,6"`. Omit for a solid rule. */
|
|
204
|
+
dashArray?: string;
|
|
205
|
+
opacity?: number;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Horizontal reference lines.
|
|
209
|
+
*
|
|
210
|
+
* Outside the reveal clip on purpose: the grid is the frame the chart arrives
|
|
211
|
+
* into, so it is already there when the marks start being uncovered.
|
|
212
|
+
*/
|
|
213
|
+
declare function PlotGrid({ rows, color, dashArray, opacity }: PlotGridProps): import("react").JSX.Element;
|
|
214
|
+
declare namespace PlotGrid {
|
|
215
|
+
var displayName: string;
|
|
216
|
+
var layer: Layer;
|
|
217
|
+
}
|
|
218
|
+
export interface PlotSeriesProps {
|
|
219
|
+
/** Column of `data` this mark draws. */
|
|
220
|
+
dataKey: string;
|
|
221
|
+
/** Overrides the theme token. */
|
|
222
|
+
color?: string;
|
|
223
|
+
/** Which `--color-chart-*` token to take, `1` to `5`. */
|
|
224
|
+
colorIndex?: number;
|
|
225
|
+
}
|
|
226
|
+
export interface PlotLineProps extends PlotSeriesProps {
|
|
227
|
+
strokeWidth?: number;
|
|
228
|
+
/** `monotone` never overshoots between points; `linear` joins them straight. */
|
|
229
|
+
curve?: PlotCurve;
|
|
230
|
+
/** Dash pattern, e.g. `"6,4"` — for a forecast, or a series that is not real. */
|
|
231
|
+
dashArray?: string;
|
|
232
|
+
}
|
|
233
|
+
/** A series as a stroked line. */
|
|
234
|
+
declare function PlotLine({ dataKey, color, colorIndex, strokeWidth, curve, dashArray, }: PlotLineProps): import("react").JSX.Element | null;
|
|
235
|
+
declare namespace PlotLine {
|
|
236
|
+
var displayName: string;
|
|
237
|
+
var layer: Layer;
|
|
238
|
+
}
|
|
239
|
+
export interface PlotAreaProps extends PlotSeriesProps {
|
|
240
|
+
opacity?: number;
|
|
241
|
+
curve?: PlotCurve;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* A series as a fill down to the baseline.
|
|
245
|
+
*
|
|
246
|
+
* Written before the line it belongs under, since the order the marks are
|
|
247
|
+
* written is the order they are drawn.
|
|
248
|
+
*/
|
|
249
|
+
declare function PlotArea({ dataKey, color, colorIndex, opacity, curve, }: PlotAreaProps): import("react").JSX.Element | null;
|
|
250
|
+
declare namespace PlotArea {
|
|
251
|
+
var displayName: string;
|
|
252
|
+
var layer: Layer;
|
|
253
|
+
}
|
|
254
|
+
export interface PlotBarsProps extends PlotSeriesProps {
|
|
255
|
+
/** Fraction of each slice left empty, `0` to `1`. */
|
|
256
|
+
gap?: number;
|
|
257
|
+
/** Rounds the end the bar grows towards, in points. */
|
|
258
|
+
radius?: number;
|
|
259
|
+
opacity?: number;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* A series as columns.
|
|
263
|
+
*
|
|
264
|
+
* One path for all of them rather than one node per bar: a plot of two hundred
|
|
265
|
+
* periods is the same single animated prop a frame as a plot of twenty.
|
|
266
|
+
*
|
|
267
|
+
* A bar has width, so its presence puts the whole plot on a band scale unless
|
|
268
|
+
* the root was told otherwise — see `xScale`.
|
|
269
|
+
*/
|
|
270
|
+
declare function PlotBars({ dataKey, color, colorIndex, gap, radius, opacity, }: PlotBarsProps): import("react").JSX.Element | null;
|
|
271
|
+
declare namespace PlotBars {
|
|
272
|
+
var displayName: string;
|
|
273
|
+
var layer: Layer;
|
|
274
|
+
var mark: "band";
|
|
275
|
+
}
|
|
276
|
+
export interface PlotDotsProps extends PlotSeriesProps {
|
|
277
|
+
/** Radius, in points. */
|
|
278
|
+
size?: number;
|
|
279
|
+
/** Ring around each dot, so it reads on top of the line rather than in it. */
|
|
280
|
+
ringWidth?: number;
|
|
281
|
+
}
|
|
282
|
+
/** A dot per row — for a series short enough that its points are worth marking. */
|
|
283
|
+
declare function PlotDots({ dataKey, color, colorIndex, size, ringWidth, }: PlotDotsProps): import("react").JSX.Element;
|
|
284
|
+
declare namespace PlotDots {
|
|
285
|
+
var displayName: string;
|
|
286
|
+
var layer: Layer;
|
|
287
|
+
}
|
|
288
|
+
export interface PlotLayerProps {
|
|
289
|
+
children?: ReactNode;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Marks of your own, in the SVG tree.
|
|
293
|
+
*
|
|
294
|
+
* Whatever is inside is drawn where it is written — before the marks written
|
|
295
|
+
* after it, after the ones before it — and reaches the geometry through
|
|
296
|
+
* `usePlot()`. It is not given the geometry as an argument, because a mark that
|
|
297
|
+
* animates has to hold hooks of its own and a render prop is not a component.
|
|
298
|
+
*/
|
|
299
|
+
declare function PlotLayer({ children }: PlotLayerProps): import("react").JSX.Element;
|
|
300
|
+
declare namespace PlotLayer {
|
|
301
|
+
var displayName: string;
|
|
302
|
+
var layer: Layer;
|
|
303
|
+
}
|
|
304
|
+
export interface PlotOverlayProps {
|
|
305
|
+
className?: string;
|
|
306
|
+
children?: ReactNode;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Anything of your own that is text or takes a touch, laid over the drawing.
|
|
310
|
+
*
|
|
311
|
+
* SVG text ignores the platform's text scaling and the theme's font, and a
|
|
312
|
+
* gesture handler cannot be attached to an SVG node at all — so those two go
|
|
313
|
+
* here rather than in `Plot.Layer`.
|
|
314
|
+
*/
|
|
315
|
+
declare function PlotOverlay({ className, children }: PlotOverlayProps): import("react").JSX.Element;
|
|
316
|
+
declare namespace PlotOverlay {
|
|
317
|
+
var displayName: string;
|
|
318
|
+
var layer: Layer;
|
|
319
|
+
}
|
|
320
|
+
export interface PlotRuleProps {
|
|
321
|
+
/** Where to draw it, in the data's own units. */
|
|
322
|
+
y: number;
|
|
323
|
+
/** A name for what the line means. Nothing is drawn without one. */
|
|
324
|
+
label?: string;
|
|
325
|
+
color?: string;
|
|
326
|
+
className?: string;
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* A reference line across the plot — a target, a limit, an average.
|
|
330
|
+
*
|
|
331
|
+
* A view rather than an SVG line, so its label is real text and follows the
|
|
332
|
+
* theme. Its height is one point and its position is a transform, so it costs
|
|
333
|
+
* no more than the SVG line would while gaining a legible caption.
|
|
334
|
+
*/
|
|
335
|
+
declare function PlotRule({ y, label, color, className }: PlotRuleProps): import("react").JSX.Element | null;
|
|
336
|
+
declare namespace PlotRule {
|
|
337
|
+
var displayName: string;
|
|
338
|
+
var layer: Layer;
|
|
339
|
+
}
|
|
340
|
+
export interface PlotXAxisProps {
|
|
341
|
+
/** How many labels to show. The rest are dropped, evenly. */
|
|
342
|
+
ticks?: number;
|
|
343
|
+
/** Turn a row into its label. Defaults to the value at `xDataKey`. */
|
|
344
|
+
format?: (datum: PlotDatum, index: number) => string;
|
|
345
|
+
className?: string;
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* The x labels. Real text rather than SVG text, so they follow the theme's font
|
|
349
|
+
* and the platform's text scaling — SVG text does neither.
|
|
350
|
+
*/
|
|
351
|
+
declare function PlotXAxis({ ticks, format, className }: PlotXAxisProps): import("react").JSX.Element;
|
|
352
|
+
declare namespace PlotXAxis {
|
|
353
|
+
var displayName: string;
|
|
354
|
+
var layer: Layer;
|
|
355
|
+
}
|
|
356
|
+
export interface PlotYAxisProps {
|
|
357
|
+
/** How many intervals to divide the axis into. Yields `ticks + 1` labels. */
|
|
358
|
+
ticks?: number;
|
|
359
|
+
/** Turn a value into its label. Defaults to a compact number. */
|
|
360
|
+
format?: (value: number) => string;
|
|
361
|
+
className?: string;
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Value labels down the side, one per grid line.
|
|
365
|
+
*
|
|
366
|
+
* Give it the same `ticks` as the grid, or the numbers name lines that are not
|
|
367
|
+
* there. Four is the default on both for that reason.
|
|
368
|
+
*
|
|
369
|
+
* The labels are the domain the data settles at, not the tweening one — a
|
|
370
|
+
* number counting through every intermediate value while the axis animates is
|
|
371
|
+
* noise, and the axis is the part of a chart that has to hold still enough to
|
|
372
|
+
* be read.
|
|
373
|
+
*/
|
|
374
|
+
declare function PlotYAxis({ ticks, format, className }: PlotYAxisProps): import("react").JSX.Element;
|
|
375
|
+
declare namespace PlotYAxis {
|
|
376
|
+
var displayName: string;
|
|
377
|
+
var layer: Layer;
|
|
378
|
+
var axis: "y";
|
|
379
|
+
}
|
|
380
|
+
export interface PlotCursorProps {
|
|
381
|
+
color?: string;
|
|
382
|
+
/** Hide the vertical line and keep only the touch handling. */
|
|
383
|
+
showLine?: boolean;
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* The touch handling, and the line that follows it.
|
|
387
|
+
*
|
|
388
|
+
* Split from the readout next door because they are separately useful: a plot
|
|
389
|
+
* whose value is shown in its own header wants this and no label, and a plot
|
|
390
|
+
* that highlights a bar wants this and nothing else at all. Both read the same
|
|
391
|
+
* index.
|
|
392
|
+
*
|
|
393
|
+
* The hit area is the whole plot. A cursor you have to land on the line to
|
|
394
|
+
* summon is a cursor nobody finds.
|
|
395
|
+
*/
|
|
396
|
+
declare function PlotCursor({ color, showLine }: PlotCursorProps): import("react").JSX.Element | null;
|
|
397
|
+
declare namespace PlotCursor {
|
|
398
|
+
var displayName: string;
|
|
399
|
+
var layer: Layer;
|
|
400
|
+
}
|
|
401
|
+
export interface PlotTooltipProps {
|
|
402
|
+
/** Format one series' value. Defaults to a compact number. */
|
|
403
|
+
formatValue?: (value: number, key: string) => string;
|
|
404
|
+
/** Format the heading from the row. Defaults to the value at `xDataKey`. */
|
|
405
|
+
formatX?: (datum: PlotDatum) => string;
|
|
406
|
+
/** Draw the readout yourself, given the row under the cursor. */
|
|
407
|
+
children?: (datum: PlotDatum, index: number) => ReactNode;
|
|
408
|
+
className?: string;
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* The readout that rides the cursor.
|
|
412
|
+
*
|
|
413
|
+
* Needs a `Plot.Cursor` beside it — the cursor owns the gesture and this only
|
|
414
|
+
* reads the index it resolves. On its own it never appears, which is the right
|
|
415
|
+
* failure: a label with no way to move is worse than no label.
|
|
416
|
+
*/
|
|
417
|
+
declare function PlotTooltip({ formatValue, formatX, children, className }: PlotTooltipProps): import("react").JSX.Element | null;
|
|
418
|
+
declare namespace PlotTooltip {
|
|
419
|
+
var displayName: string;
|
|
420
|
+
var layer: Layer;
|
|
421
|
+
}
|
|
422
|
+
export interface PlotHeaderProps extends ViewProps {
|
|
423
|
+
className?: string;
|
|
424
|
+
/** A word for what the plot is of. */
|
|
425
|
+
title?: string;
|
|
426
|
+
/** The figure, large. Usually the total, or the row under the cursor. */
|
|
427
|
+
value?: string;
|
|
428
|
+
/** A line under the value. */
|
|
429
|
+
caption?: string;
|
|
430
|
+
/** Replaces the whole header, keeping only its place above the drawing. */
|
|
431
|
+
children?: ReactNode;
|
|
432
|
+
}
|
|
433
|
+
/** The row above the drawing: what it is, and the one number worth reading. */
|
|
434
|
+
declare function PlotHeader({ className, title, value, caption, children, ...props }: PlotHeaderProps): import("react").JSX.Element;
|
|
435
|
+
declare namespace PlotHeader {
|
|
436
|
+
var displayName: string;
|
|
437
|
+
var layer: Layer;
|
|
438
|
+
}
|
|
439
|
+
export interface PlotLegendProps extends ViewProps {
|
|
440
|
+
className?: string;
|
|
441
|
+
/** Names for the columns, keyed by `dataKey`. Falls back to the key itself. */
|
|
442
|
+
labels?: Record<string, string>;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* A swatch and a name per mark, taken from the marks that registered.
|
|
446
|
+
*
|
|
447
|
+
* In the header rather than over the drawing, because a key laid inside the
|
|
448
|
+
* plot either covers a mark or is squeezed to one word a line.
|
|
449
|
+
*/
|
|
450
|
+
declare function PlotLegend({ className, labels, ...props }: PlotLegendProps): import("react").JSX.Element | null;
|
|
451
|
+
declare namespace PlotLegend {
|
|
452
|
+
var displayName: string;
|
|
453
|
+
var layer: Layer;
|
|
454
|
+
}
|
|
455
|
+
export declare const Plot: import("react").ForwardRefExoticComponent<PlotProps & import("react").RefAttributes<PlotHandle>> & {
|
|
456
|
+
Header: typeof PlotHeader;
|
|
457
|
+
Legend: typeof PlotLegend;
|
|
458
|
+
Grid: typeof PlotGrid;
|
|
459
|
+
Area: typeof PlotArea;
|
|
460
|
+
Bars: typeof PlotBars;
|
|
461
|
+
Line: typeof PlotLine;
|
|
462
|
+
Dots: typeof PlotDots;
|
|
463
|
+
Rule: typeof PlotRule;
|
|
464
|
+
Layer: typeof PlotLayer;
|
|
465
|
+
Overlay: typeof PlotOverlay;
|
|
466
|
+
XAxis: typeof PlotXAxis;
|
|
467
|
+
YAxis: typeof PlotYAxis;
|
|
468
|
+
Cursor: typeof PlotCursor;
|
|
469
|
+
Tooltip: typeof PlotTooltip;
|
|
470
|
+
};
|
|
471
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/plot/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,OAAO,EAWL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAA4C,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAExF,OAAiB,EAQf,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAYjC,OAAO,EAUL,KAAK,IAAI,IAAI,OAAO,EACrB,MAAM,sBAAmB,CAAC;AAU3B,OAAO,EACL,QAAQ,EACR,MAAM,EACN,OAAO,EACP,aAAa,EACb,QAAQ,EACR,OAAO,EACP,GAAG,EACH,GAAG,EACH,GAAG,GACJ,MAAM,sBAAmB,CAAC;AAC3B,YAAY,EAAE,IAAI,IAAI,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAmB,CAAC;AAwBrE;;;;GAIG;AACH,KAAK,KAAK,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE1C,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,CAAC;AAC7C,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;AAC9C,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;AAE3E;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAEzC,8EAA8E;AAC9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A+D;IAC/D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,iCAAiC;AACjC,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,KAAK,EACL,KAAK,EACL,OAAO,EACP,MAAc,EACd,QAAQ,GACT,EAAE,qBAAqB,+BAwCvB;kBA/CQ,gBAAgB;;;AAiDzB,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4EAA4E;IAC5E,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CACtC;AAED;;;;;;GAMG;AACH,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,qBAAqB,sCAmBzE;kBAnBQ,gBAAgB;;;AAoCzB,eAAO,MAAM,UAAU;;;;;;CAMrB,CAAC"}
|
|
@@ -84,7 +84,14 @@ export interface SectionRailBarProps {
|
|
|
84
84
|
/** Nesting depth. Deeper levels draw a shorter bar. */
|
|
85
85
|
level?: number;
|
|
86
86
|
}
|
|
87
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* One section, drawn as a bar.
|
|
89
|
+
*
|
|
90
|
+
* Three lengths rather than two: the active bar is longest and brightest, the
|
|
91
|
+
* bars either side of it keep a share of that, and everything further away sits
|
|
92
|
+
* at the resting length. What the reader gets from the extra step is *where* in
|
|
93
|
+
* the run they are without counting bars — the slope points at the middle of it.
|
|
94
|
+
*/
|
|
88
95
|
declare function SectionRailBar({ className, value, level }: SectionRailBarProps): import("react").JSX.Element;
|
|
89
96
|
export interface SectionRailContentProps extends ViewProps {
|
|
90
97
|
className?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/section-rail/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,
|
|
1
|
+
{"version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