uplot-plus 0.1.0 → 0.1.1
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/README.md +13 -62
- package/package.json +1 -1
- package/dist/annotations.d.ts +0 -22
- package/dist/annotations.d.ts.map +0 -1
- package/dist/axes/layout.d.ts +0 -30
- package/dist/axes/layout.d.ts.map +0 -1
- package/dist/axes/ticks.d.ts +0 -47
- package/dist/axes/ticks.d.ts.map +0 -1
- package/dist/colors.d.ts +0 -32
- package/dist/colors.d.ts.map +0 -1
- package/dist/components/Axis.d.ts +0 -14
- package/dist/components/Axis.d.ts.map +0 -1
- package/dist/components/Band.d.ts +0 -10
- package/dist/components/Band.d.ts.map +0 -1
- package/dist/components/Chart.d.ts +0 -8
- package/dist/components/Chart.d.ts.map +0 -1
- package/dist/components/Legend.d.ts +0 -12
- package/dist/components/Legend.d.ts.map +0 -1
- package/dist/components/ResponsiveChart.d.ts +0 -18
- package/dist/components/ResponsiveChart.d.ts.map +0 -1
- package/dist/components/Scale.d.ts +0 -11
- package/dist/components/Scale.d.ts.map +0 -1
- package/dist/components/Series.d.ts +0 -11
- package/dist/components/Series.d.ts.map +0 -1
- package/dist/components/Sparkline.d.ts +0 -28
- package/dist/components/Sparkline.d.ts.map +0 -1
- package/dist/components/Timeline.d.ts +0 -8
- package/dist/components/Timeline.d.ts.map +0 -1
- package/dist/components/Tooltip.d.ts +0 -9
- package/dist/components/Tooltip.d.ts.map +0 -1
- package/dist/components/ZoomRanger.d.ts +0 -26
- package/dist/components/ZoomRanger.d.ts.map +0 -1
- package/dist/components/annotations/AnnotationLabel.d.ts +0 -26
- package/dist/components/annotations/AnnotationLabel.d.ts.map +0 -1
- package/dist/components/annotations/HLine.d.ts +0 -22
- package/dist/components/annotations/HLine.d.ts.map +0 -1
- package/dist/components/annotations/Region.d.ts +0 -22
- package/dist/components/annotations/Region.d.ts.map +0 -1
- package/dist/components/annotations/VLine.d.ts +0 -22
- package/dist/components/annotations/VLine.d.ts.map +0 -1
- package/dist/components/annotations/index.d.ts +0 -9
- package/dist/components/annotations/index.d.ts.map +0 -1
- package/dist/core/BlockMinMax.d.ts +0 -42
- package/dist/core/BlockMinMax.d.ts.map +0 -1
- package/dist/core/CursorManager.d.ts +0 -43
- package/dist/core/CursorManager.d.ts.map +0 -1
- package/dist/core/DataStore.d.ts +0 -51
- package/dist/core/DataStore.d.ts.map +0 -1
- package/dist/core/RenderScheduler.d.ts +0 -28
- package/dist/core/RenderScheduler.d.ts.map +0 -1
- package/dist/core/Scale.d.ts +0 -23
- package/dist/core/Scale.d.ts.map +0 -1
- package/dist/core/ScaleManager.d.ts +0 -45
- package/dist/core/ScaleManager.d.ts.map +0 -1
- package/dist/formatters.d.ts +0 -39
- package/dist/formatters.d.ts.map +0 -1
- package/dist/hooks/useChart.d.ts +0 -5
- package/dist/hooks/useChart.d.ts.map +0 -1
- package/dist/hooks/useChartStore.d.ts +0 -69
- package/dist/hooks/useChartStore.d.ts.map +0 -1
- package/dist/hooks/useDrawHook.d.ts +0 -14
- package/dist/hooks/useDrawHook.d.ts.map +0 -1
- package/dist/hooks/useInteraction.d.ts +0 -14
- package/dist/hooks/useInteraction.d.ts.map +0 -1
- package/dist/hooks/useStreamingData.d.ts +0 -35
- package/dist/hooks/useStreamingData.d.ts.map +0 -1
- package/dist/index.cjs +0 -1
- package/dist/index.d.ts +0 -47
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -3203
- package/dist/math/align.d.ts +0 -10
- package/dist/math/align.d.ts.map +0 -1
- package/dist/math/increments.d.ts +0 -9
- package/dist/math/increments.d.ts.map +0 -1
- package/dist/math/stack.d.ts +0 -16
- package/dist/math/stack.d.ts.map +0 -1
- package/dist/math/utils.d.ts +0 -74
- package/dist/math/utils.d.ts.map +0 -1
- package/dist/paths/bars.d.ts +0 -9
- package/dist/paths/bars.d.ts.map +0 -1
- package/dist/paths/candlestick.d.ts +0 -35
- package/dist/paths/candlestick.d.ts.map +0 -1
- package/dist/paths/catmullRom.d.ts +0 -9
- package/dist/paths/catmullRom.d.ts.map +0 -1
- package/dist/paths/linear.d.ts +0 -10
- package/dist/paths/linear.d.ts.map +0 -1
- package/dist/paths/monotoneCubic.d.ts +0 -10
- package/dist/paths/monotoneCubic.d.ts.map +0 -1
- package/dist/paths/points.d.ts +0 -10
- package/dist/paths/points.d.ts.map +0 -1
- package/dist/paths/spline.d.ts +0 -9
- package/dist/paths/spline.d.ts.map +0 -1
- package/dist/paths/stepped.d.ts +0 -9
- package/dist/paths/stepped.d.ts.map +0 -1
- package/dist/paths/types.d.ts +0 -32
- package/dist/paths/types.d.ts.map +0 -1
- package/dist/paths/utils.d.ts +0 -19
- package/dist/paths/utils.d.ts.map +0 -1
- package/dist/rendering/CanvasRenderer.d.ts +0 -75
- package/dist/rendering/CanvasRenderer.d.ts.map +0 -1
- package/dist/rendering/drawAxes.d.ts +0 -8
- package/dist/rendering/drawAxes.d.ts.map +0 -1
- package/dist/rendering/drawBands.d.ts +0 -8
- package/dist/rendering/drawBands.d.ts.map +0 -1
- package/dist/rendering/drawCursor.d.ts +0 -22
- package/dist/rendering/drawCursor.d.ts.map +0 -1
- package/dist/rendering/drawPoints.d.ts +0 -13
- package/dist/rendering/drawPoints.d.ts.map +0 -1
- package/dist/rendering/drawSelect.d.ts +0 -14
- package/dist/rendering/drawSelect.d.ts.map +0 -1
- package/dist/rendering/drawSeries.d.ts +0 -7
- package/dist/rendering/drawSeries.d.ts.map +0 -1
- package/dist/sync/SyncGroup.d.ts +0 -33
- package/dist/sync/SyncGroup.d.ts.map +0 -1
- package/dist/sync/useSyncGroup.d.ts +0 -8
- package/dist/sync/useSyncGroup.d.ts.map +0 -1
- package/dist/time/fmtDate.d.ts +0 -15
- package/dist/time/fmtDate.d.ts.map +0 -1
- package/dist/time/timeIncrs.d.ts +0 -17
- package/dist/time/timeIncrs.d.ts.map +0 -1
- package/dist/time/timeSplits.d.ts +0 -6
- package/dist/time/timeSplits.d.ts.map +0 -1
- package/dist/time/timeVals.d.ts +0 -16
- package/dist/time/timeVals.d.ts.map +0 -1
- package/dist/types/axes.d.ts +0 -84
- package/dist/types/axes.d.ts.map +0 -1
- package/dist/types/bands.d.ts +0 -12
- package/dist/types/bands.d.ts.map +0 -1
- package/dist/types/chart.d.ts +0 -53
- package/dist/types/chart.d.ts.map +0 -1
- package/dist/types/common.d.ts +0 -62
- package/dist/types/common.d.ts.map +0 -1
- package/dist/types/cursor.d.ts +0 -22
- package/dist/types/cursor.d.ts.map +0 -1
- package/dist/types/data.d.ts +0 -32
- package/dist/types/data.d.ts.map +0 -1
- package/dist/types/events.d.ts +0 -57
- package/dist/types/events.d.ts.map +0 -1
- package/dist/types/hooks.d.ts +0 -28
- package/dist/types/hooks.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -10
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/legend.d.ts +0 -8
- package/dist/types/legend.d.ts.map +0 -1
- package/dist/types/scales.d.ts +0 -60
- package/dist/types/scales.d.ts.map +0 -1
- package/dist/types/series.d.ts +0 -76
- package/dist/types/series.d.ts.map +0 -1
- package/dist/types/timeline.d.ts +0 -30
- package/dist/types/timeline.d.ts.map +0 -1
- package/dist/types/tooltip.d.ts +0 -33
- package/dist/types/tooltip.d.ts.map +0 -1
- package/dist/utils/shallowEqual.d.ts +0 -10
- package/dist/utils/shallowEqual.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
High-performance React charting library ripped off from uPlot. Might perform occasionally better than original uPlot in React context (or worse). Definitely easier to use in React context.
|
|
4
4
|
|
|
5
|
-
**[Live Demo (85+ examples)](https://yeonsoo-p.github.io/
|
|
5
|
+
**[Live Demo (85+ examples)](https://yeonsoo-p.github.io/uPlot-Plus/)**
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
@@ -232,67 +232,18 @@ Sliding-window data management for real-time charts:
|
|
|
232
232
|
```tsx
|
|
233
233
|
import { useStreamingData } from 'uplot-plus';
|
|
234
234
|
|
|
235
|
-
const { data, push, start, stop, fps } = useStreamingData(initialData, {
|
|
235
|
+
const { data, push, pushGroup, start, stop, fps } = useStreamingData(initialData, {
|
|
236
236
|
window: 1000, // keep last 1000 points
|
|
237
237
|
batchSize: 10, // push 10 points per tick
|
|
238
238
|
});
|
|
239
239
|
|
|
240
|
-
//
|
|
240
|
+
// Push into group 0 (default):
|
|
241
241
|
push([newX], [newY1], [newY2]);
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
## Axis Value Formatters
|
|
245
242
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
```tsx
|
|
249
|
-
import { fmtCompact, fmtSuffix, fmtHourMin, fmtMonthName, fmtLabels } from 'uplot-plus';
|
|
250
|
-
|
|
251
|
-
<Axis scale="y" values={fmtCompact()} /> // 1.2K, 3.5M
|
|
252
|
-
<Axis scale="y" values={fmtSuffix('%')} /> // 42%
|
|
253
|
-
<Axis scale="y" values={fmtSuffix('°C', 1)} /> // 23.5°C
|
|
254
|
-
<Axis scale="x" values={fmtHourMin({ utc: true })} /> // 14:30
|
|
255
|
-
<Axis scale="x" values={fmtMonthName()} /> // Jan, Feb, ...
|
|
256
|
-
<Axis scale="x" values={fmtLabels(['Q1','Q2','Q3','Q4'])} />
|
|
243
|
+
// Push into a specific group (for multi-x-axis charts):
|
|
244
|
+
pushGroup(1, [newX], [newY1]);
|
|
257
245
|
```
|
|
258
246
|
|
|
259
|
-
## Color Utilities
|
|
260
|
-
|
|
261
|
-
```tsx
|
|
262
|
-
import { fadeGradient, withAlpha, palette } from 'uplot-plus';
|
|
263
|
-
|
|
264
|
-
// Gradient that fades from color to transparent (for area fills)
|
|
265
|
-
<Series fill={fadeGradient('#3498db')} />
|
|
266
|
-
<Series fill={fadeGradient('#e74c3c', 1.0, 0.2)} />
|
|
267
|
-
|
|
268
|
-
// Match fill to stroke with lower opacity
|
|
269
|
-
<Series stroke="#2980b9" fill={withAlpha('#2980b9', 0.1)} />
|
|
270
|
-
|
|
271
|
-
// Generate N distinct colors
|
|
272
|
-
const colors = palette(5); // 5 visually distinct HSL colors
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
## Data Utilities
|
|
276
|
-
|
|
277
|
-
### `stackGroup`
|
|
278
|
-
|
|
279
|
-
Computes stacked series values and generates band configs:
|
|
280
|
-
|
|
281
|
-
```tsx
|
|
282
|
-
import { stackGroup, Band } from 'uplot-plus';
|
|
283
|
-
|
|
284
|
-
const raw = { x: [1, 2, 3], series: [[10, 20, 30], [5, 10, 15]] };
|
|
285
|
-
const { group, bands } = stackGroup(raw);
|
|
286
|
-
|
|
287
|
-
<Chart data={[group]}>
|
|
288
|
-
{bands.map((b, i) => <Band key={i} {...b} />)}
|
|
289
|
-
</Chart>
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
### `alignData`
|
|
293
|
-
|
|
294
|
-
Aligns data across multiple x-axes for multi-group charts.
|
|
295
|
-
|
|
296
247
|
## Annotations
|
|
297
248
|
|
|
298
249
|
Declarative annotation components — place inside `<Chart>`:
|
|
@@ -315,16 +266,16 @@ Imperative helpers are available for advanced draw hooks that need programmatic
|
|
|
315
266
|
import { drawHLine, drawVLine, drawLabel, drawRegion } from 'uplot-plus';
|
|
316
267
|
```
|
|
317
268
|
|
|
318
|
-
##
|
|
269
|
+
## Utilities
|
|
319
270
|
|
|
320
|
-
|
|
271
|
+
| Category | Functions |
|
|
272
|
+
| ---------- | ----------- |
|
|
273
|
+
| Axis formatters | `fmtCompact`, `fmtSuffix`, `fmtHourMin`, `fmtMonthName`, `fmtDateStr`, `fmtLabels` |
|
|
274
|
+
| Color helpers | `fadeGradient`, `withAlpha`, `palette` |
|
|
275
|
+
| Data transforms | `stackGroup`, `alignData` |
|
|
276
|
+
| Scale math | `valToPos`, `posToVal` |
|
|
321
277
|
|
|
322
|
-
|
|
323
|
-
import { valToPos, posToVal } from 'uplot-plus';
|
|
324
|
-
|
|
325
|
-
const px = valToPos(dataValue, scale, dimension, offset);
|
|
326
|
-
const val = posToVal(pixelPos, scale, dimension, offset);
|
|
327
|
-
```
|
|
278
|
+
> Full API, signatures, and examples: [docs/UTILITIES.md](docs/UTILITIES.md)
|
|
328
279
|
|
|
329
280
|
## Development
|
|
330
281
|
|
package/package.json
CHANGED
package/dist/annotations.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { DrawContext } from './types/hooks';
|
|
2
|
-
import type { ScaleState } from './types';
|
|
3
|
-
export interface AnnotationStyle {
|
|
4
|
-
stroke?: string;
|
|
5
|
-
width?: number;
|
|
6
|
-
dash?: number[];
|
|
7
|
-
fill?: string;
|
|
8
|
-
font?: string;
|
|
9
|
-
}
|
|
10
|
-
/** Draw a horizontal line at a y-value.
|
|
11
|
-
* Assumes ctx is already pxRatio-scaled (handled by the library). */
|
|
12
|
-
export declare function drawHLine(dc: DrawContext, yScale: ScaleState, value: number, style?: AnnotationStyle): void;
|
|
13
|
-
/** Draw a vertical line at an x-value.
|
|
14
|
-
* Assumes ctx is already pxRatio-scaled (handled by the library). */
|
|
15
|
-
export declare function drawVLine(dc: DrawContext, xScale: ScaleState, value: number, style?: AnnotationStyle): void;
|
|
16
|
-
/** Draw a text label at data coordinates.
|
|
17
|
-
* Assumes ctx is already pxRatio-scaled (handled by the library). */
|
|
18
|
-
export declare function drawLabel(dc: DrawContext, xScale: ScaleState, yScale: ScaleState, xVal: number, yVal: number, text: string, style?: AnnotationStyle): void;
|
|
19
|
-
/** Draw a shaded region between two y-values.
|
|
20
|
-
* Assumes ctx is already pxRatio-scaled (handled by the library). */
|
|
21
|
-
export declare function drawRegion(dc: DrawContext, yScale: ScaleState, yMin: number, yMax: number, style?: AnnotationStyle): void;
|
|
22
|
-
//# sourceMappingURL=annotations.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"annotations.d.ts","sourceRoot":"","sources":["../src/annotations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAG1C,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;sEACsE;AACtE,wBAAgB,SAAS,CACvB,EAAE,EAAE,WAAW,EACf,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,MAAM,EACb,KAAK,GAAE,eAAoB,GAC1B,IAAI,CAYN;AAED;sEACsE;AACtE,wBAAgB,SAAS,CACvB,EAAE,EAAE,WAAW,EACf,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,MAAM,EACb,KAAK,GAAE,eAAoB,GAC1B,IAAI,CAYN;AAED;sEACsE;AACtE,wBAAgB,SAAS,CACvB,EAAE,EAAE,WAAW,EACf,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,KAAK,GAAE,eAAoB,GAC1B,IAAI,CASN;AAED;sEACsE;AACtE,wBAAgB,UAAU,CACxB,EAAE,EAAE,WAAW,EACf,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,KAAK,GAAE,eAAoB,GAC1B,IAAI,CAcN"}
|
package/dist/axes/layout.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { ScaleState, BBox } from '../types';
|
|
2
|
-
import type { AxisState } from '../types/axes';
|
|
3
|
-
/**
|
|
4
|
-
* Run one cycle of axis calculation.
|
|
5
|
-
* For each visible axis, compute tick positions, labels, and size.
|
|
6
|
-
* Returns true if all axis sizes have converged.
|
|
7
|
-
*
|
|
8
|
-
* Ported from uPlot uPlot.js axesCalc.
|
|
9
|
-
*/
|
|
10
|
-
export declare function axesCalc(axisStates: AxisState[], getScale: (id: string) => ScaleState | undefined, plotWidCss: number, plotHgtCss: number, cycleNum: number): boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Compute the plot area bounding box by subtracting axis sizes from the chart dimensions.
|
|
13
|
-
*
|
|
14
|
-
* Ported from uPlot uPlot.js calcPlotRect (lines 818-870).
|
|
15
|
-
*/
|
|
16
|
-
export declare function calcPlotRect(chartWidth: number, chartHeight: number, axisStates: AxisState[]): BBox;
|
|
17
|
-
/**
|
|
18
|
-
* Compute axis positions (_pos and _lpos) using cumulative offsets from plot edges.
|
|
19
|
-
*
|
|
20
|
-
* Ported from uPlot uPlot.js calcAxesRects (lines 872-899).
|
|
21
|
-
*/
|
|
22
|
-
export declare function calcAxesRects(axisStates: AxisState[], plotBox: BBox): void;
|
|
23
|
-
/**
|
|
24
|
-
* Run the convergence loop: repeatedly calculate axes and plot rect
|
|
25
|
-
* until axis sizes stabilize (or max 3 cycles).
|
|
26
|
-
*
|
|
27
|
-
* Ported from uPlot uPlot.js convergeSize.
|
|
28
|
-
*/
|
|
29
|
-
export declare function convergeSize(chartWidth: number, chartHeight: number, axisStates: AxisState[], getScale: (id: string) => ScaleState | undefined): BBox;
|
|
30
|
-
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/axes/layout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAiB/C;;;;;;GAMG;AACH,wBAAgB,QAAQ,CACtB,UAAU,EAAE,SAAS,EAAE,EACvB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS,EAChD,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,GACf,OAAO,CAoFT;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,SAAS,EAAE,GACtB,IAAI,CAsCN;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,GAAG,IAAI,CA8B1E;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,SAAS,EAAE,EACvB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS,GAC/C,IAAI,CAqCN"}
|
package/dist/axes/ticks.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { AxisConfig, AxisState } from '../types/axes';
|
|
2
|
-
/**
|
|
3
|
-
* Generate tick split positions for a numeric (linear) axis.
|
|
4
|
-
* Ported from uPlot opts.js numAxisSplits.
|
|
5
|
-
*/
|
|
6
|
-
export declare function numAxisSplits(scaleMin: number, scaleMax: number, foundIncr: number, _foundSpace: number, forceMin: boolean): number[];
|
|
7
|
-
/**
|
|
8
|
-
* Format tick values as strings for a numeric axis.
|
|
9
|
-
* Ported from uPlot opts.js numAxisVals.
|
|
10
|
-
*/
|
|
11
|
-
export declare function numAxisVals(splits: number[]): string[];
|
|
12
|
-
/**
|
|
13
|
-
* Generate tick split positions for a log-scale axis.
|
|
14
|
-
* Ported from uPlot opts.js logAxisSplits.
|
|
15
|
-
*/
|
|
16
|
-
export declare function logAxisSplits(scaleMin: number, scaleMax: number, logBase: number): number[];
|
|
17
|
-
/**
|
|
18
|
-
* Generate tick split positions for an asinh (symmetric log) axis.
|
|
19
|
-
* Produces linear ticks near zero and logarithmic ticks at larger magnitudes.
|
|
20
|
-
*
|
|
21
|
-
* @param scaleMin - minimum value on the scale
|
|
22
|
-
* @param scaleMax - maximum value on the scale
|
|
23
|
-
* @param linthresh - linear threshold (values within [-linthresh, linthresh] are linear)
|
|
24
|
-
*/
|
|
25
|
-
export declare function asinhAxisSplits(scaleMin: number, scaleMax: number, linthresh?: number): number[];
|
|
26
|
-
/**
|
|
27
|
-
* Filter log axis split values to reduce label density.
|
|
28
|
-
* Keeps only values that are exact powers of the log base.
|
|
29
|
-
* This prevents crowded labels at intermediate ticks (2, 3, 4... between 1 and 10).
|
|
30
|
-
*/
|
|
31
|
-
export declare function logAxisValFilter(splits: number[], logBase: number): boolean[];
|
|
32
|
-
/**
|
|
33
|
-
* Determine optimal tick increment and spacing for an axis.
|
|
34
|
-
* Ported from uPlot uPlot.js getIncrSpace.
|
|
35
|
-
*/
|
|
36
|
-
export declare function getIncrSpace(axis: AxisConfig, min: number, max: number, fullDim: number): [number, number];
|
|
37
|
-
/**
|
|
38
|
-
* Compute the size of an axis in CSS pixels.
|
|
39
|
-
* For vertical axes, estimates width from the longest tick label.
|
|
40
|
-
* For horizontal axes, uses a fixed height based on font size.
|
|
41
|
-
*/
|
|
42
|
-
export declare function computeAxisSize(axis: AxisConfig, _values: string[] | null, _cycleNum: number): number;
|
|
43
|
-
/**
|
|
44
|
-
* Create an initial AxisState from an AxisConfig.
|
|
45
|
-
*/
|
|
46
|
-
export declare function createAxisState(config: AxisConfig): AxisState;
|
|
47
|
-
//# sourceMappingURL=ticks.d.ts.map
|
package/dist/axes/ticks.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ticks.d.ts","sourceRoot":"","sources":["../../src/axes/ticks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAiB3D;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,OAAO,GAChB,MAAM,EAAE,CAaV;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAEtD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CA0CV;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,SAAS,SAAI,GACZ,MAAM,EAAE,CA8CV;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EAAE,EAChB,OAAO,EAAE,MAAM,GACd,OAAO,EAAE,CAUX;AAYD;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,UAAU,EAChB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,GACd,CAAC,MAAM,EAAE,MAAM,CAAC,CAWlB;AAKD;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EACxB,SAAS,EAAE,MAAM,GAChB,MAAM,CAsBR;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,CAa7D"}
|
package/dist/colors.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { GradientConfig } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Create a vertical linear gradient that fades a color from one opacity to another.
|
|
4
|
-
* Useful for area charts: `fill={fadeGradient('#3498db')}`.
|
|
5
|
-
*
|
|
6
|
-
* Supports hex (#rgb, #rrggbb) and rgb()/rgba() color strings.
|
|
7
|
-
*
|
|
8
|
-
* @param color - CSS color string (hex or rgb/rgba)
|
|
9
|
-
* @param fromAlpha - opacity at the top (default 0.8)
|
|
10
|
-
* @param toAlpha - opacity at the bottom (default 0.0)
|
|
11
|
-
*/
|
|
12
|
-
export declare function fadeGradient(color: string, fromAlpha?: number, toAlpha?: number): GradientConfig;
|
|
13
|
-
/**
|
|
14
|
-
* Return a CSS color string with a new alpha value.
|
|
15
|
-
* Useful for matching fill to stroke: `fill={withAlpha(stroke, 0.1)}`.
|
|
16
|
-
*
|
|
17
|
-
* Supports hex (#rgb, #rrggbb) and rgb()/rgba() color strings.
|
|
18
|
-
*
|
|
19
|
-
* @param color - CSS color string (hex or rgb/rgba)
|
|
20
|
-
* @param alpha - opacity 0–1
|
|
21
|
-
*/
|
|
22
|
-
export declare function withAlpha(color: string, alpha: number): string;
|
|
23
|
-
/**
|
|
24
|
-
* Generate a palette of N visually distinct colors using HSL rotation.
|
|
25
|
-
* Uses the golden angle (~137.5°) for maximum separation between adjacent colors.
|
|
26
|
-
*
|
|
27
|
-
* @param n - number of colors to generate
|
|
28
|
-
* @param saturation - HSL saturation percentage (default 65)
|
|
29
|
-
* @param lightness - HSL lightness percentage (default 50)
|
|
30
|
-
*/
|
|
31
|
-
export declare function palette(n: number, saturation?: number, lightness?: number): string[];
|
|
32
|
-
//# sourceMappingURL=colors.d.ts.map
|
package/dist/colors.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../src/colors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAqC9C;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,EACb,SAAS,SAAM,EACf,OAAO,SAAM,GACZ,cAAc,CAchB;AAED;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAK9D;AAED;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,SAAK,EAAE,SAAS,SAAK,GAAG,MAAM,EAAE,CAQ5E"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { AxisConfig } from '../types';
|
|
2
|
-
import { Side } from '../types';
|
|
3
|
-
export type AxisProps = Omit<AxisConfig, 'side'> & {
|
|
4
|
-
side?: Side;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* Renderless component that registers an axis config with the chart store.
|
|
8
|
-
* Must be a child of <Chart>.
|
|
9
|
-
*
|
|
10
|
-
* Mount effect registers/unregisters based on identity keys (scale, side).
|
|
11
|
-
* Sync effect updates config when any prop changes (shallow-equality bail-out).
|
|
12
|
-
*/
|
|
13
|
-
export declare function Axis(props: AxisProps): null;
|
|
14
|
-
//# sourceMappingURL=Axis.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Axis.d.ts","sourceRoot":"","sources":["../../src/components/Axis.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIhC,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC;AAMnE;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CAuC3C"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { BandConfig } from '../types/bands';
|
|
2
|
-
/**
|
|
3
|
-
* Renderless component that registers a band config with the chart store.
|
|
4
|
-
* A band fills the area between two series.
|
|
5
|
-
*
|
|
6
|
-
* Uses a mount/update split: registers once on mount, replaces config immutably on prop changes.
|
|
7
|
-
* Destructures series tuple to primitives for stable dependency comparison.
|
|
8
|
-
*/
|
|
9
|
-
export declare function Band({ series, group, fill, dir }: BandConfig): null;
|
|
10
|
-
//# sourceMappingURL=Band.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Band.d.ts","sourceRoot":"","sources":["../../src/components/Band.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGjD;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,UAAU,GAAG,IAAI,CA6BnE"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ChartProps } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Root chart component.
|
|
4
|
-
* Creates a canvas element, manages the chart store, and provides context to children.
|
|
5
|
-
* Canvas drawing is completely decoupled from React's reconciliation cycle.
|
|
6
|
-
*/
|
|
7
|
-
export declare function Chart({ width, height, data, children, className, pxRatio: pxRatioOverride, onDraw, onCursorDraw, syncKey, cursor, onClick, onContextMenu, onDblClick, onCursorMove, onCursorLeave, onScaleChange, onSelect, }: ChartProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
//# sourceMappingURL=Chart.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../../src/components/Chart.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAO3C;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,EACpB,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,eAAe,EAClE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EACrC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAC/D,aAAa,EAAE,QAAQ,GACxB,EAAE,UAAU,2CAsJZ"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { LegendConfig } from '../types/legend';
|
|
3
|
-
interface LegendProps extends LegendConfig {
|
|
4
|
-
className?: string;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Legend component that shows series labels with color swatches.
|
|
8
|
-
* Updates live as the cursor moves. Click to toggle series visibility.
|
|
9
|
-
*/
|
|
10
|
-
export declare function Legend({ show, position, className }: LegendProps): React.ReactElement | null;
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=Legend.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Legend.d.ts","sourceRoot":"","sources":["../../src/components/Legend.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0D,MAAM,OAAO,CAAC;AAE/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGpD,UAAU,WAAY,SAAQ,YAAY;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAwDD;;;GAGG;AACH,wBAAgB,MAAM,CAAC,EAAE,IAAW,EAAE,QAAmB,EAAE,SAAS,EAAE,EAAE,WAAW,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAiE9G"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { ChartProps } from '../types/chart';
|
|
2
|
-
export interface ResponsiveChartProps extends Omit<ChartProps, 'width' | 'height'> {
|
|
3
|
-
/** Minimum width in CSS pixels (default: 100) */
|
|
4
|
-
minWidth?: number;
|
|
5
|
-
/** Minimum height in CSS pixels (default: 100) */
|
|
6
|
-
minHeight?: number;
|
|
7
|
-
/** If set, height = width / aspectRatio */
|
|
8
|
-
aspectRatio?: number;
|
|
9
|
-
/** Initial height when container height is auto (default: 300) */
|
|
10
|
-
initialHeight?: number;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Chart wrapper that auto-sizes to its container via ResizeObserver.
|
|
14
|
-
* The container div takes 100% width; height is either derived from
|
|
15
|
-
* container, aspectRatio, or initialHeight.
|
|
16
|
-
*/
|
|
17
|
-
export declare function ResponsiveChart({ minWidth, minHeight, aspectRatio, initialHeight, ...chartProps }: ResponsiveChartProps): React.JSX.Element;
|
|
18
|
-
//# sourceMappingURL=ResponsiveChart.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ResponsiveChart.d.ts","sourceRoot":"","sources":["../../src/components/ResponsiveChart.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,QAAQ,CAAC;IAChF,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAc,EACd,SAAe,EACf,WAAW,EACX,aAAmB,EACnB,GAAG,UAAU,EACd,EAAE,oBAAoB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAmD1C"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { ScaleConfig } from '../types';
|
|
2
|
-
export type ScaleProps = ScaleConfig;
|
|
3
|
-
/**
|
|
4
|
-
* Renderless component that registers a scale config with the chart store.
|
|
5
|
-
* Must be a child of <Chart>.
|
|
6
|
-
*
|
|
7
|
-
* Mount effect registers/unregisters based on identity key (id).
|
|
8
|
-
* Sync effect updates config when any prop changes (shallow-equality bail-out).
|
|
9
|
-
*/
|
|
10
|
-
export declare function Scale(props: ScaleProps): null;
|
|
11
|
-
//# sourceMappingURL=Scale.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Scale.d.ts","sourceRoot":"","sources":["../../src/components/Scale.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAI5C,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC;AAErC;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAgC7C"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { SeriesConfig } from '../types';
|
|
2
|
-
export type SeriesProps = SeriesConfig;
|
|
3
|
-
/**
|
|
4
|
-
* Renderless component that registers a series config with the chart store.
|
|
5
|
-
* Must be a child of <Chart>.
|
|
6
|
-
*
|
|
7
|
-
* Mount effect registers/unregisters based on identity keys (group, index).
|
|
8
|
-
* Sync effect updates config when any prop changes (shallow-equality bail-out).
|
|
9
|
-
*/
|
|
10
|
-
export declare function Series(props: SeriesProps): null;
|
|
11
|
-
//# sourceMappingURL=Series.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Series.d.ts","sourceRoot":"","sources":["../../src/components/Series.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAI7C,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC;AAEvC;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAoC/C"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { ChartData, ColorValue } from '../types';
|
|
2
|
-
import type { PathBuilder } from '../paths/types';
|
|
3
|
-
export interface SparklineProps {
|
|
4
|
-
/** Chart data (single group, single series expected) */
|
|
5
|
-
data: ChartData;
|
|
6
|
-
/** Width in CSS pixels (default: 150) */
|
|
7
|
-
width?: number;
|
|
8
|
-
/** Height in CSS pixels (default: 30) */
|
|
9
|
-
height?: number;
|
|
10
|
-
/** Line/bar color (default: '#03a9f4') */
|
|
11
|
-
stroke?: ColorValue;
|
|
12
|
-
/** Fill color */
|
|
13
|
-
fill?: ColorValue;
|
|
14
|
-
/** Line width in CSS pixels (default: 1) */
|
|
15
|
-
lineWidth?: number;
|
|
16
|
-
/** Path builder — pass bars() for bar sparklines (default: linear) */
|
|
17
|
-
paths?: PathBuilder;
|
|
18
|
-
/** Fill target value (e.g. 0 for bars) */
|
|
19
|
-
fillTo?: number;
|
|
20
|
-
/** CSS class name for the wrapper div */
|
|
21
|
-
className?: string;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Compact inline chart with no axes or interaction.
|
|
25
|
-
* Ideal for sparklines in tables and dashboards.
|
|
26
|
-
*/
|
|
27
|
-
export declare function Sparkline({ data, width, height, stroke, fill, lineWidth, paths, fillTo, className, }: SparklineProps): React.JSX.Element;
|
|
28
|
-
//# sourceMappingURL=Sparkline.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Sparkline.d.ts","sourceRoot":"","sources":["../../src/components/Sparkline.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,cAAc;IAC7B,wDAAwD;IACxD,IAAI,EAAE,SAAS,CAAC;IAChB,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,iBAAiB;IACjB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sEAAsE;IACtE,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,KAAW,EACX,MAAW,EACX,MAAkB,EAClB,IAAI,EACJ,SAAa,EACb,KAAK,EACL,MAAM,EACN,SAAS,GACV,EAAE,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAqBpC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { TimelineProps } from '../types/timeline';
|
|
2
|
-
/**
|
|
3
|
-
* Timeline component — renders discrete event spans as horizontal colored bars.
|
|
4
|
-
* Each lane is a category, each segment is a time range with optional color/label.
|
|
5
|
-
* Uses useDrawHook to draw on the persistent canvas layer.
|
|
6
|
-
*/
|
|
7
|
-
export declare function Timeline({ lanes, laneHeight, gap, scaleId, }: TimelineProps): null;
|
|
8
|
-
//# sourceMappingURL=Timeline.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Timeline.d.ts","sourceRoot":"","sources":["../../src/components/Timeline.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,UAAe,EACf,GAAO,EACP,OAAa,GACd,EAAE,aAAa,GAAG,IAAI,CA+DtB"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { TooltipProps } from '../types/tooltip';
|
|
3
|
-
/**
|
|
4
|
-
* Tooltip component that shows data values at the cursor position.
|
|
5
|
-
* Uses useSyncExternalStore to subscribe to cursor state updates.
|
|
6
|
-
* Positioned as an absolute HTML overlay inside the chart container.
|
|
7
|
-
*/
|
|
8
|
-
export declare function Tooltip({ show, className, children, offset, }: TooltipProps): React.ReactElement | null;
|
|
9
|
-
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/components/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAEzE,OAAO,KAAK,EAAE,YAAY,EAA4B,MAAM,kBAAkB,CAAC;AAa/E;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,EACtB,IAAW,EACX,SAAS,EACT,QAAQ,EACR,MAAW,GACZ,EAAE,YAAY,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAiI1C"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ChartData } from '../types';
|
|
3
|
-
export interface ZoomRangerProps {
|
|
4
|
-
/** Chart width in CSS pixels */
|
|
5
|
-
width: number;
|
|
6
|
-
/** Chart height in CSS pixels */
|
|
7
|
-
height: number;
|
|
8
|
-
/** Data to render in the overview */
|
|
9
|
-
data: ChartData;
|
|
10
|
-
/** Called when the selection range changes */
|
|
11
|
-
onRangeChange?: (min: number, max: number) => void;
|
|
12
|
-
/** Initial selection range as [min, max] data values */
|
|
13
|
-
initialRange?: [number, number];
|
|
14
|
-
/** CSS class for the outer wrapper */
|
|
15
|
-
className?: string;
|
|
16
|
-
/** Series colors (one per series in group 0) */
|
|
17
|
-
colors?: string[];
|
|
18
|
-
/** Show grip handles on edges */
|
|
19
|
-
grips?: boolean;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* ZoomRanger — an overview mini-chart with a draggable selection window.
|
|
23
|
-
* The selection controls the zoom range of a linked detail chart via onRangeChange.
|
|
24
|
-
*/
|
|
25
|
-
export declare function ZoomRanger({ width, height, data, onRangeChange, initialRange, className, colors, grips, }: ZoomRangerProps): React.ReactElement;
|
|
26
|
-
//# sourceMappingURL=ZoomRanger.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ZoomRanger.d.ts","sourceRoot":"","sources":["../../src/components/ZoomRanger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAM1C,MAAM,WAAW,eAAe;IAC9B,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,IAAI,EAAE,SAAS,CAAC;IAChB,8CAA8C;IAC9C,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,wDAAwD;IACxD,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,iCAAiC;IACjC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,MAAM,EACN,IAAI,EACJ,aAAa,EACb,YAAY,EACZ,SAAS,EACT,MAAM,EACN,KAAa,GACd,EAAE,eAAe,GAAG,KAAK,CAAC,YAAY,CAwNtC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export interface AnnotationLabelProps {
|
|
2
|
-
/** X data value */
|
|
3
|
-
x: number;
|
|
4
|
-
/** Y data value */
|
|
5
|
-
y: number;
|
|
6
|
-
/** Label text */
|
|
7
|
-
text: string;
|
|
8
|
-
/** Scale id for the x-axis (default: 'x') */
|
|
9
|
-
xScale?: string;
|
|
10
|
-
/** Scale id for the y-axis (default: 'y') */
|
|
11
|
-
yScale?: string;
|
|
12
|
-
/** Text color (default: '#000') */
|
|
13
|
-
fill?: string;
|
|
14
|
-
/** Font (default: '12px sans-serif') */
|
|
15
|
-
font?: string;
|
|
16
|
-
/** Text alignment (default: 'left') */
|
|
17
|
-
align?: CanvasTextAlign;
|
|
18
|
-
/** Text baseline (default: 'bottom') */
|
|
19
|
-
baseline?: CanvasTextBaseline;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Declarative text label annotation at data coordinates.
|
|
23
|
-
* Place inside `<Chart>`.
|
|
24
|
-
*/
|
|
25
|
-
export declare function AnnotationLabel(props: AnnotationLabelProps): null;
|
|
26
|
-
//# sourceMappingURL=AnnotationLabel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AnnotationLabel.d.ts","sourceRoot":"","sources":["../../../src/components/annotations/AnnotationLabel.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,oBAAoB;IACnC,mBAAmB;IACnB,CAAC,EAAE,MAAM,CAAC;IACV,mBAAmB;IACnB,CAAC,EAAE,MAAM,CAAC;IACV,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,kBAAkB,CAAC;CAC/B;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,IAAI,CAmBjE"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export interface HLineProps {
|
|
2
|
-
/** Y data value where the line is drawn */
|
|
3
|
-
value: number;
|
|
4
|
-
/** Scale id for the y-axis (default: 'y') */
|
|
5
|
-
yScale?: string;
|
|
6
|
-
/** Line color (default: 'red') */
|
|
7
|
-
stroke?: string;
|
|
8
|
-
/** Line width in CSS pixels (default: 1) */
|
|
9
|
-
width?: number;
|
|
10
|
-
/** Dash pattern */
|
|
11
|
-
dash?: number[];
|
|
12
|
-
/** Optional text label drawn at the left edge */
|
|
13
|
-
label?: string;
|
|
14
|
-
/** Font for the label */
|
|
15
|
-
labelFont?: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Declarative horizontal line annotation.
|
|
19
|
-
* Renders a horizontal line at a y-data-value. Place inside `<Chart>`.
|
|
20
|
-
*/
|
|
21
|
-
export declare function HLine(props: HLineProps): null;
|
|
22
|
-
//# sourceMappingURL=HLine.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HLine.d.ts","sourceRoot":"","sources":["../../../src/components/annotations/HLine.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,UAAU;IACzB,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mBAAmB;IACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yBAAyB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CA6B7C"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export interface RegionProps {
|
|
2
|
-
/** Lower y data value */
|
|
3
|
-
yMin: number;
|
|
4
|
-
/** Upper y data value */
|
|
5
|
-
yMax: number;
|
|
6
|
-
/** Scale id for the y-axis (default: 'y') */
|
|
7
|
-
yScale?: string;
|
|
8
|
-
/** Fill color (default: 'rgba(255,0,0,0.1)') */
|
|
9
|
-
fill?: string;
|
|
10
|
-
/** Border stroke color */
|
|
11
|
-
stroke?: string;
|
|
12
|
-
/** Border stroke width */
|
|
13
|
-
strokeWidth?: number;
|
|
14
|
-
/** Border dash pattern */
|
|
15
|
-
dash?: number[];
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Declarative shaded region annotation.
|
|
19
|
-
* Fills the area between two y-data-values. Place inside `<Chart>`.
|
|
20
|
-
*/
|
|
21
|
-
export declare function Region(props: RegionProps): null;
|
|
22
|
-
//# sourceMappingURL=Region.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Region.d.ts","sourceRoot":"","sources":["../../../src/components/annotations/Region.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,WAAW;IAC1B,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0BAA0B;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0BAA0B;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0BAA0B;IAC1B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAkB/C"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export interface VLineProps {
|
|
2
|
-
/** X data value where the line is drawn */
|
|
3
|
-
value: number;
|
|
4
|
-
/** Scale id for the x-axis (default: 'x') */
|
|
5
|
-
xScale?: string;
|
|
6
|
-
/** Line color (default: 'red') */
|
|
7
|
-
stroke?: string;
|
|
8
|
-
/** Line width in CSS pixels (default: 1) */
|
|
9
|
-
width?: number;
|
|
10
|
-
/** Dash pattern */
|
|
11
|
-
dash?: number[];
|
|
12
|
-
/** Optional text label drawn at the top */
|
|
13
|
-
label?: string;
|
|
14
|
-
/** Font for the label */
|
|
15
|
-
labelFont?: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Declarative vertical line annotation.
|
|
19
|
-
* Renders a vertical line at an x-data-value. Place inside `<Chart>`.
|
|
20
|
-
*/
|
|
21
|
-
export declare function VLine(props: VLineProps): null;
|
|
22
|
-
//# sourceMappingURL=VLine.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VLine.d.ts","sourceRoot":"","sources":["../../../src/components/annotations/VLine.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,UAAU;IACzB,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mBAAmB;IACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yBAAyB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CA6B7C"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { HLine } from './HLine';
|
|
2
|
-
export { VLine } from './VLine';
|
|
3
|
-
export { Region } from './Region';
|
|
4
|
-
export { AnnotationLabel } from './AnnotationLabel';
|
|
5
|
-
export type { HLineProps } from './HLine';
|
|
6
|
-
export type { VLineProps } from './VLine';
|
|
7
|
-
export type { RegionProps } from './Region';
|
|
8
|
-
export type { AnnotationLabelProps } from './AnnotationLabel';
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/annotations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
|