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/dist/math/align.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ChartData } from '../types/data';
|
|
2
|
-
/**
|
|
3
|
-
* Align multiple datasets with different x-values to a common x-axis.
|
|
4
|
-
* Merges all unique x-values and fills gaps with null.
|
|
5
|
-
*
|
|
6
|
-
* @param datasets - Array of [xValues, yValues] tuples
|
|
7
|
-
* @returns ChartData with one group containing all aligned series
|
|
8
|
-
*/
|
|
9
|
-
export declare function alignData(datasets: [ArrayLike<number>, ArrayLike<number | null>][]): ChartData;
|
|
10
|
-
//# sourceMappingURL=align.d.ts.map
|
package/dist/math/align.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"align.d.ts","sourceRoot":"","sources":["../../src/math/align.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,QAAQ,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,EAAE,GACxD,SAAS,CAiCX"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/** Decimal increments: ...0.01, 0.02, 0.025, 0.05, 0.1, 0.2, 0.25, 0.5 */
|
|
2
|
-
export declare const decIncrs: number[];
|
|
3
|
-
/** Integer increments: 1, 2, 2.5, 5, 10, 20, 25, 50... */
|
|
4
|
-
export declare const oneIncrs: number[];
|
|
5
|
-
/** Whole-number increments: 1, 2, 5, 10, 20, 25, 50... */
|
|
6
|
-
export declare const wholeIncrs: number[];
|
|
7
|
-
/** Combined numeric increments (decimal + integer) */
|
|
8
|
-
export declare const numIncrs: number[];
|
|
9
|
-
//# sourceMappingURL=increments.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"increments.d.ts","sourceRoot":"","sources":["../../src/math/increments.ts"],"names":[],"mappings":"AAKA,0EAA0E;AAC1E,eAAO,MAAM,QAAQ,UAAiC,CAAC;AAEvD,0DAA0D;AAC1D,eAAO,MAAM,QAAQ,UAAgC,CAAC;AAEtD,0DAA0D;AAC1D,eAAO,MAAM,UAAU,UAA6B,CAAC;AAErD,sDAAsD;AACtD,eAAO,MAAM,QAAQ,UAA4B,CAAC"}
|
package/dist/math/stack.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { XGroup } from '../types/data';
|
|
2
|
-
import type { BandConfig } from '../types/bands';
|
|
3
|
-
/**
|
|
4
|
-
* Stack series within a data group by computing cumulative sums.
|
|
5
|
-
* Returns a new XGroup with stacked y-values and auto-generated band configs.
|
|
6
|
-
*
|
|
7
|
-
* @param group - The data group to stack
|
|
8
|
-
* @param seriesIndices - Which series indices to include (default: all)
|
|
9
|
-
* @param groupIdx - Group index for band configs (default: 0)
|
|
10
|
-
* @returns Stacked group and band configs for fills between layers
|
|
11
|
-
*/
|
|
12
|
-
export declare function stackGroup(group: XGroup, seriesIndices?: number[], groupIdx?: number): {
|
|
13
|
-
group: XGroup;
|
|
14
|
-
bands: BandConfig[];
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=stack.d.ts.map
|
package/dist/math/stack.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../src/math/stack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGjD;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,MAAM,EACb,aAAa,CAAC,EAAE,MAAM,EAAE,EACxB,QAAQ,SAAI,GACX;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,UAAU,EAAE,CAAA;CAAE,CAwDxC"}
|
package/dist/math/utils.d.ts
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { SortOrder } from '../types';
|
|
2
|
-
export declare const PI: number;
|
|
3
|
-
export declare const abs: (x: number) => number;
|
|
4
|
-
export declare const floor: (x: number) => number;
|
|
5
|
-
export declare const round: (x: number) => number;
|
|
6
|
-
export declare const ceil: (x: number) => number;
|
|
7
|
-
export declare const min: (...values: number[]) => number;
|
|
8
|
-
export declare const max: (...values: number[]) => number;
|
|
9
|
-
export declare const pow: (x: number, y: number) => number;
|
|
10
|
-
export declare const sqrt: (x: number) => number;
|
|
11
|
-
export declare const sign: (x: number) => number;
|
|
12
|
-
export declare const log10: (x: number) => number;
|
|
13
|
-
export declare const log2: (x: number) => number;
|
|
14
|
-
export declare const sinh: (v: number, linthresh?: number) => number;
|
|
15
|
-
export declare const asinh: (v: number, linthresh?: number) => number;
|
|
16
|
-
export declare const inf: number;
|
|
17
|
-
export declare const isInt: (number: unknown) => boolean;
|
|
18
|
-
/** Binary search for index of closest value in a sorted array */
|
|
19
|
-
export declare function closestIdx(num: number, arr: ArrayLike<number>, lo?: number, hi?: number): number;
|
|
20
|
-
/** Find first and last non-null indices in a range */
|
|
21
|
-
export declare const nonNullIdxs: (data: ArrayLike<number | null | undefined>, _i0: number, _i1: number) => [number, number];
|
|
22
|
-
/** Find first and last positive indices in a range (for log scales) */
|
|
23
|
-
export declare const positiveIdxs: (data: ArrayLike<number | null | undefined>, _i0: number, _i1: number) => [number, number];
|
|
24
|
-
/** Get min and max of a data array within index range */
|
|
25
|
-
export declare function getMinMax(data: ArrayLike<number | null>, _i0: number, _i1: number, sorted?: SortOrder, log?: boolean): [number, number];
|
|
26
|
-
/** Round to a specified number of decimal places (half away from zero) */
|
|
27
|
-
export declare function roundDec(val: number, dec?: number): number;
|
|
28
|
-
declare const fixedDecMap: Map<number, number>;
|
|
29
|
-
export { fixedDecMap as fixedDec };
|
|
30
|
-
/** Guess the number of decimal places in a number */
|
|
31
|
-
export declare function guessDec(num: number): number;
|
|
32
|
-
/** Round num to nearest multiple of incr */
|
|
33
|
-
export declare function incrRound(num: number, incr: number, _fixFloat?: boolean): number;
|
|
34
|
-
/** Round num up to nearest multiple of incr */
|
|
35
|
-
export declare function incrRoundUp(num: number, incr: number, _fixFloat?: boolean): number;
|
|
36
|
-
/** Round num down to nearest multiple of incr */
|
|
37
|
-
export declare function incrRoundDn(num: number, incr: number, _fixFloat?: boolean): number;
|
|
38
|
-
/** Generate increment values for tick spacing */
|
|
39
|
-
export declare function genIncrs(base: number, minExp: number, maxExp: number, mults: number[]): number[];
|
|
40
|
-
/** Clamp a value between min and max */
|
|
41
|
-
export declare function clamp(num: number, _min: number, _max: number): number;
|
|
42
|
-
export declare const fmtNum: (val: number) => string;
|
|
43
|
-
/** Check if range has any non-null data */
|
|
44
|
-
export declare function hasData(data: ArrayLike<number | null>, idx0: number, idx1: number): boolean;
|
|
45
|
-
/** Range padding/soft config for auto-ranging */
|
|
46
|
-
export interface RangePartConfig {
|
|
47
|
-
pad: number;
|
|
48
|
-
soft: number | null;
|
|
49
|
-
mode: number;
|
|
50
|
-
hard?: number;
|
|
51
|
-
}
|
|
52
|
-
export declare const rangePad = 0.1;
|
|
53
|
-
export declare const autoRangePart: RangePartConfig;
|
|
54
|
-
/**
|
|
55
|
-
* Compute a nice range for numeric data with padding and soft/hard limits.
|
|
56
|
-
* Supports both (min, max, cfg) and (min, max, mult, extra) calling conventions.
|
|
57
|
-
*/
|
|
58
|
-
export declare function rangeNum(_min: number, _max: number, cfgOrMult: {
|
|
59
|
-
min: RangePartConfig;
|
|
60
|
-
max: RangePartConfig;
|
|
61
|
-
} | number, extra?: boolean): [number, number];
|
|
62
|
-
/** Compute range for log scales */
|
|
63
|
-
export declare function rangeLog(min_: number, max_: number, base: number, fullMags: boolean): [number, number];
|
|
64
|
-
/** Compute range for asinh scales */
|
|
65
|
-
export declare function rangeAsinh(min_: number, max_: number, base: number, fullMags: boolean): [number, number];
|
|
66
|
-
/** Count integer digits of a number (for axis label width estimation) */
|
|
67
|
-
export declare function numIntDigits(x: number): number;
|
|
68
|
-
/**
|
|
69
|
-
* Find the optimal tick increment for a given value range.
|
|
70
|
-
* Searches the increments array for the smallest increment that gives
|
|
71
|
-
* at least `minSpace` pixels between ticks.
|
|
72
|
-
*/
|
|
73
|
-
export declare function findIncr(minVal: number, maxVal: number, incrs: readonly number[], dim: number, minSpace: number): [number, number];
|
|
74
|
-
//# sourceMappingURL=utils.d.ts.map
|
package/dist/math/utils.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","s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AE,MAAM,GACf,CAAC,MAAM,EAAE,MAAM,CAAC,CAelB"}
|
package/dist/paths/bars.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { PathBuilder } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Bar/column chart path builder.
|
|
4
|
-
* Draws vertical (or horizontal) bars at each data point.
|
|
5
|
-
*
|
|
6
|
-
* Ported from uPlot/src/paths/bars.js
|
|
7
|
-
*/
|
|
8
|
-
export declare function bars(): PathBuilder;
|
|
9
|
-
//# sourceMappingURL=bars.d.ts.map
|
package/dist/paths/bars.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bars.d.ts","sourceRoot":"","sources":["../../src/paths/bars.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,WAAW,EAAmB,MAAM,SAAS,CAAC;AAKzE;;;;;GAKG;AACH,wBAAgB,IAAI,IAAI,WAAW,CAgGlC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { DrawCallback } from '../types/hooks';
|
|
2
|
-
import type { ScaleState } from '../types';
|
|
3
|
-
export interface CandlestickOpts {
|
|
4
|
-
/** X values array */
|
|
5
|
-
xValues: ArrayLike<number>;
|
|
6
|
-
/** Open values array */
|
|
7
|
-
open: ArrayLike<number | null>;
|
|
8
|
-
/** High values array */
|
|
9
|
-
high: ArrayLike<number | null>;
|
|
10
|
-
/** Low values array */
|
|
11
|
-
low: ArrayLike<number | null>;
|
|
12
|
-
/** Close values array */
|
|
13
|
-
close: ArrayLike<number | null>;
|
|
14
|
-
/** X scale state — must have min/max set */
|
|
15
|
-
xScale: ScaleState;
|
|
16
|
-
/** Y scale state — must have min/max set */
|
|
17
|
-
yScale: ScaleState;
|
|
18
|
-
/** Color for up candles (close >= open) */
|
|
19
|
-
upColor?: string;
|
|
20
|
-
/** Color for down candles (close < open) */
|
|
21
|
-
downColor?: string;
|
|
22
|
-
/** Body width as fraction of available space (default 0.6) */
|
|
23
|
-
bodyWidth?: number;
|
|
24
|
-
/** Wick width in CSS pixels (default 1) */
|
|
25
|
-
wickWidth?: number;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Creates a DrawCallback that renders candlestick (OHLC) candles.
|
|
29
|
-
* Use with the Chart's `onDraw` prop or `useDrawHook`.
|
|
30
|
-
*
|
|
31
|
-
* The caller must provide the data arrays and scale states directly
|
|
32
|
-
* since DrawCallback only receives { ctx, plotBox, pxRatio }.
|
|
33
|
-
*/
|
|
34
|
-
export declare function drawCandlesticks(opts: CandlestickOpts): DrawCallback;
|
|
35
|
-
//# sourceMappingURL=candlestick.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"candlestick.d.ts","sourceRoot":"","sources":["../../src/paths/candlestick.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG3C,MAAM,WAAW,eAAe;IAC9B,qBAAqB;IACrB,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAC3B,wBAAwB;IACxB,IAAI,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC/B,wBAAwB;IACxB,IAAI,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC/B,uBAAuB;IACvB,GAAG,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC9B,yBAAyB;IACzB,KAAK,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAChC,4CAA4C;IAC5C,MAAM,EAAE,UAAU,CAAC;IACnB,4CAA4C;IAC5C,MAAM,EAAE,UAAU,CAAC;IACnB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,eAAe,GAAG,YAAY,CAyDpE"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { PathBuilder } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Centripetal Catmull-Rom spline path builder (alpha=0.5).
|
|
4
|
-
* Avoids cusps and self-intersections common with uniform Catmull-Rom.
|
|
5
|
-
*
|
|
6
|
-
* Ported from uPlot/src/paths/catmullRomCentrip.js
|
|
7
|
-
*/
|
|
8
|
-
export declare function catmullRom(): PathBuilder;
|
|
9
|
-
//# sourceMappingURL=catmullRom.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"catmullRom.d.ts","sourceRoot":"","sources":["../../src/paths/catmullRom.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAI3C;;;;;GAKG;AACH,wBAAgB,UAAU,IAAI,WAAW,CAExC"}
|
package/dist/paths/linear.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { PathBuilder } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Linear path builder with pixel-level decimation.
|
|
4
|
-
* When the number of data points exceeds 4x the pixel width,
|
|
5
|
-
* collapses multiple points per pixel into min/max/in/out representation.
|
|
6
|
-
*
|
|
7
|
-
* Ported from uPlot/src/paths/linear.js
|
|
8
|
-
*/
|
|
9
|
-
export declare function linear(): PathBuilder;
|
|
10
|
-
//# sourceMappingURL=linear.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"linear.d.ts","sourceRoot":"","sources":["../../src/paths/linear.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,WAAW,EAAmB,MAAM,SAAS,CAAC;AA0BzE;;;;;;GAMG;AACH,wBAAgB,MAAM,IAAI,WAAW,CAmKpC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { PathBuilder } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Monotone cubic spline path builder (Fritsch-Carlson method).
|
|
4
|
-
* Guarantees monotonicity — the interpolated curve never overshoots
|
|
5
|
-
* the y-range of adjacent data points.
|
|
6
|
-
*
|
|
7
|
-
* Ported from uPlot/src/paths/monotoneCubic.js
|
|
8
|
-
*/
|
|
9
|
-
export declare function monotoneCubic(): PathBuilder;
|
|
10
|
-
//# sourceMappingURL=monotoneCubic.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"monotoneCubic.d.ts","sourceRoot":"","sources":["../../src/paths/monotoneCubic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAI3C;;;;;;GAMG;AACH,wBAAgB,aAAa,IAAI,WAAW,CAE3C"}
|
package/dist/paths/points.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { PathBuilder } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Points-only path builder.
|
|
4
|
-
* Produces circle arcs at each data point — no connecting lines.
|
|
5
|
-
* The resulting path is used as both stroke and fill.
|
|
6
|
-
*
|
|
7
|
-
* Ported from uPlot/src/paths/points.js
|
|
8
|
-
*/
|
|
9
|
-
export declare function points(ptSize?: number): PathBuilder;
|
|
10
|
-
//# sourceMappingURL=points.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"points.d.ts","sourceRoot":"","sources":["../../src/paths/points.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,WAAW,EAAmB,MAAM,SAAS,CAAC;AAKzE;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,MAAM,SAAI,GAAG,WAAW,CA+C9C"}
|
package/dist/paths/spline.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { PathBuilder } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Spline path builder — wraps an interpolation function.
|
|
4
|
-
* Used by monotoneCubic and catmullRom.
|
|
5
|
-
*/
|
|
6
|
-
export declare function splineInterp(interp: SplineInterpFn): PathBuilder;
|
|
7
|
-
/** Interpolation function type used by splineInterp */
|
|
8
|
-
export type SplineInterpFn = (xs: number[], ys: number[], isHoriz: boolean, pxRound: (v: number) => number) => Path2D | null;
|
|
9
|
-
//# sourceMappingURL=spline.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spline.d.ts","sourceRoot":"","sources":["../../src/paths/spline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,WAAW,EAAmB,MAAM,SAAS,CAAC;AAOzE;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,cAAc,GACrB,WAAW,CA8Eb;AAED,uDAAuD;AACvD,MAAM,MAAM,cAAc,GAAG,CAC3B,EAAE,EAAE,MAAM,EAAE,EACZ,EAAE,EAAE,MAAM,EAAE,EACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,KAC3B,MAAM,GAAG,IAAI,CAAC"}
|
package/dist/paths/stepped.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { PathBuilder } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Stepped (staircase) path builder.
|
|
4
|
-
* Supports align: 1 (step after), -1 (step before), 0 (mid-step).
|
|
5
|
-
*
|
|
6
|
-
* Ported from uPlot/src/paths/stepped.js
|
|
7
|
-
*/
|
|
8
|
-
export declare function stepped(defaultAlign?: -1 | 0 | 1): PathBuilder;
|
|
9
|
-
//# sourceMappingURL=stepped.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stepped.d.ts","sourceRoot":"","sources":["../../src/paths/stepped.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,WAAW,EAAmB,MAAM,SAAS,CAAC;AAOzE;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,WAAW,CA+F9D"}
|
package/dist/paths/types.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { ScaleState } from '../types';
|
|
2
|
-
import type { Direction } from '../types';
|
|
3
|
-
/** Result of a path builder */
|
|
4
|
-
export interface SeriesPaths {
|
|
5
|
-
stroke: Path2D;
|
|
6
|
-
fill: Path2D | null;
|
|
7
|
-
clip: Path2D | null;
|
|
8
|
-
band: Path2D | null;
|
|
9
|
-
gaps: [number, number][] | null;
|
|
10
|
-
}
|
|
11
|
-
/** Options passed to path builders beyond positional data */
|
|
12
|
-
export interface PathBuilderOpts {
|
|
13
|
-
/** Value to fill down to (default: scaleY.min) */
|
|
14
|
-
fillTo?: number;
|
|
15
|
-
/** Whether to connect across null gaps */
|
|
16
|
-
spanGaps?: boolean;
|
|
17
|
-
/** Step alignment: -1=before (step after point), 1=after (step before), 0=mid */
|
|
18
|
-
align?: -1 | 0 | 1;
|
|
19
|
-
/** Bar width as fraction of available column space (0-1, default 0.6) */
|
|
20
|
-
barWidth?: number;
|
|
21
|
-
/** Extra gap between bars in pixels (default 0) */
|
|
22
|
-
barGap?: number;
|
|
23
|
-
/** Corner radius for bars as fraction of bar width (0-1, default 0) */
|
|
24
|
-
barRadius?: number;
|
|
25
|
-
/** For grouped bars: this series' position in the group (0-based) */
|
|
26
|
-
barGroupIdx?: number;
|
|
27
|
-
/** For grouped bars: total number of series in the group */
|
|
28
|
-
barGroupCount?: number;
|
|
29
|
-
}
|
|
30
|
-
/** Path builder function signature */
|
|
31
|
-
export type PathBuilder = (dataX: ArrayLike<number>, dataY: ArrayLike<number | null>, scaleX: ScaleState, scaleY: ScaleState, xDim: number, yDim: number, xOff: number, yOff: number, idx0: number, idx1: number, dir: Direction, pxRound: (v: number) => number, opts?: PathBuilderOpts) => SeriesPaths;
|
|
32
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/paths/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,+BAA+B;AAC/B,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC;CACjC;AAED,6DAA6D;AAC7D,MAAM,WAAW,eAAe;IAC9B,kDAAkD;IAClD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iFAAiF;IACjF,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACnB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4DAA4D;IAC5D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,sCAAsC;AACtC,MAAM,MAAM,WAAW,GAAG,CACxB,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,EACxB,KAAK,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAC/B,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,SAAS,EACd,OAAO,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,EAC9B,IAAI,CAAC,EAAE,eAAe,KACnB,WAAW,CAAC"}
|
package/dist/paths/utils.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ScaleState } from '../types';
|
|
2
|
-
import { Orientation, Direction } from '../types';
|
|
3
|
-
/** Line-to for horizontal orientation */
|
|
4
|
-
export declare function lineToH(path: Path2D, x: number, y: number): void;
|
|
5
|
-
/** Line-to for vertical orientation */
|
|
6
|
-
export declare function lineToV(path: Path2D, y: number, x: number): void;
|
|
7
|
-
/** Create a valToPos function for a given scale, dimension, and offset */
|
|
8
|
-
export declare function makeValToPos(scale: ScaleState, dim: number, off: number): (val: number) => number;
|
|
9
|
-
/** Create a posToVal function for a given scale, dimension, and offset */
|
|
10
|
-
export declare function makePosToVal(scale: ScaleState, dim: number, off: number): (pos: number) => number;
|
|
11
|
-
/**
|
|
12
|
-
* Find gaps (null regions) in data for clip path generation.
|
|
13
|
-
*/
|
|
14
|
-
export declare function findGaps(dataX: ArrayLike<number>, dataY: ArrayLike<number | null>, idx0: number, idx1: number, dir: Direction, pixelForX: (val: number) => number): [number, number][];
|
|
15
|
-
/**
|
|
16
|
-
* Create a clip path that excludes gap regions.
|
|
17
|
-
*/
|
|
18
|
-
export declare function clipGaps(gaps: [number, number][], ori: Orientation, xOff: number, yOff: number, xDim: number, yDim: number): Path2D;
|
|
19
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/paths/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAA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|
-
import type { SeriesConfig, ScaleState, BBox } from '../types';
|
|
2
|
-
import type { SeriesPaths } from '../paths/types';
|
|
3
|
-
export interface RenderableSeriesInfo {
|
|
4
|
-
config: SeriesConfig;
|
|
5
|
-
dataX: ArrayLike<number>;
|
|
6
|
-
dataY: ArrayLike<number | null>;
|
|
7
|
-
xScale: ScaleState;
|
|
8
|
-
yScale: ScaleState;
|
|
9
|
-
window: [number, number];
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Imperative canvas renderer.
|
|
13
|
-
* Handles clearing, drawing series, and (later) axes, cursor, selection.
|
|
14
|
-
* This is completely decoupled from React.
|
|
15
|
-
*/
|
|
16
|
-
export declare class CanvasRenderer {
|
|
17
|
-
private ctx;
|
|
18
|
-
private pxRatio;
|
|
19
|
-
private pathCache;
|
|
20
|
-
private pathCacheSize;
|
|
21
|
-
private lruOrder;
|
|
22
|
-
private snapshotCanvas;
|
|
23
|
-
private snapshotValid;
|
|
24
|
-
private cachedFillStyle;
|
|
25
|
-
private cachedStrokeStyle;
|
|
26
|
-
private cachedLineWidth;
|
|
27
|
-
private cachedFont;
|
|
28
|
-
private cachedTextAlign;
|
|
29
|
-
private cachedTextBaseline;
|
|
30
|
-
private cachedGlobalAlpha;
|
|
31
|
-
setContext(ctx: CanvasRenderingContext2D, pxRatio: number): void;
|
|
32
|
-
/** Reset cached property values (after context change) */
|
|
33
|
-
private resetPropertyCache;
|
|
34
|
-
/** Set fillStyle only if changed */
|
|
35
|
-
setFillStyle(ctx: CanvasRenderingContext2D, val: string): void;
|
|
36
|
-
/** Set strokeStyle only if changed */
|
|
37
|
-
setStrokeStyle(ctx: CanvasRenderingContext2D, val: string): void;
|
|
38
|
-
/** Set lineWidth only if changed */
|
|
39
|
-
setLineWidth(ctx: CanvasRenderingContext2D, val: number): void;
|
|
40
|
-
/** Set font only if changed */
|
|
41
|
-
setFont(ctx: CanvasRenderingContext2D, val: string): void;
|
|
42
|
-
/** Set textAlign only if changed */
|
|
43
|
-
setTextAlign(ctx: CanvasRenderingContext2D, val: CanvasTextAlign): void;
|
|
44
|
-
/** Set textBaseline only if changed */
|
|
45
|
-
setTextBaseline(ctx: CanvasRenderingContext2D, val: CanvasTextBaseline): void;
|
|
46
|
-
/** Set globalAlpha only if changed */
|
|
47
|
-
setGlobalAlpha(ctx: CanvasRenderingContext2D, val: number): void;
|
|
48
|
-
/** Save a snapshot of the current canvas using an offscreen canvas (much cheaper than getImageData) */
|
|
49
|
-
saveSnapshot(ctx: CanvasRenderingContext2D, w: number, h: number): void;
|
|
50
|
-
/** Restore a previously saved snapshot. Returns false if no snapshot exists. */
|
|
51
|
-
restoreSnapshot(ctx: CanvasRenderingContext2D): boolean;
|
|
52
|
-
/** Invalidate the saved snapshot */
|
|
53
|
-
invalidateSnapshot(): void;
|
|
54
|
-
private windowKey;
|
|
55
|
-
/** Get cached paths for a series, promoting to most-recently-used */
|
|
56
|
-
getCachedPaths(group: number, index: number, i0: number, i1: number): SeriesPaths | undefined;
|
|
57
|
-
/** Store paths in cache, evicting oldest 25% when at capacity */
|
|
58
|
-
setCachedPaths(group: number, index: number, i0: number, i1: number, paths: SeriesPaths): void;
|
|
59
|
-
/** Invalidate paths for a specific series (all windows) */
|
|
60
|
-
invalidateSeries(group: number, index: number): void;
|
|
61
|
-
/** Invalidate cached paths for a specific group */
|
|
62
|
-
clearGroupCache(group: number): void;
|
|
63
|
-
/** Invalidate all cached paths (e.g. on scale change) */
|
|
64
|
-
clearCache(): void;
|
|
65
|
-
/**
|
|
66
|
-
* Draw a single series onto the canvas (assumes context is already clipped).
|
|
67
|
-
* Builds/caches paths and delegates to drawSeriesPath.
|
|
68
|
-
*/
|
|
69
|
-
drawSeries(info: RenderableSeriesInfo, plotBox: BBox, pxRatio: number): void;
|
|
70
|
-
/**
|
|
71
|
-
* Full draw cycle: clear canvas and draw all series.
|
|
72
|
-
*/
|
|
73
|
-
draw(canvasWidth: number, canvasHeight: number, plotBox: BBox, seriesList: RenderableSeriesInfo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AAK,EAAE,MAAM,GAAG,IAAI;IAWpD,mDAAmD;IACnD,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAYpC,yDAAyD;IACzD,UAAU,IAAI,IAAI;IAOlB;;;OAGG;IACH,UAAU,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IA0C5E;;OAEG;IACH,IAAI,CACF,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,IAAI,EACb,UAAU,EAAE,oBAAoB,EAAE,GACjC,IAAI;CAqBR"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ScaleState, BBox } from '../types';
|
|
2
|
-
import type { AxisState } from '../types/axes';
|
|
3
|
-
/**
|
|
4
|
-
* Draw all axes: grid lines, tick marks, tick labels, axis labels, borders.
|
|
5
|
-
* Ported from uPlot uPlot.js drawAxesGrid.
|
|
6
|
-
*/
|
|
7
|
-
export declare function drawAxesGrid(ctx: CanvasRenderingContext2D, axisStates: AxisState[], getScale: (id: string) => ScaleState | undefined, plotBox: BBox, pxRatio: number): void;
|
|
8
|
-
//# sourceMappingURL=drawAxes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drawAxes.d.ts","sourceRoot":"","sources":["../../src/rendering/drawAxes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AA4E/C;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,wBAAwB,EAC7B,UAAU,EAAE,SAAS,EAAE,EACvB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS,EAChD,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,MAAM,GACd,IAAI,CA+JN"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { BBox, ScaleState } from '../types';
|
|
2
|
-
import type { BandConfig } from '../types/bands';
|
|
3
|
-
/**
|
|
4
|
-
* Draw a filled band between two series within the plot area.
|
|
5
|
-
* Renders the region between upper and lower y-values as a filled polygon.
|
|
6
|
-
*/
|
|
7
|
-
export declare function drawBand(ctx: CanvasRenderingContext2D, band: BandConfig, dataX: ArrayLike<number>, upperY: ArrayLike<number | null>, lowerY: ArrayLike<number | null>, xScale: ScaleState, yScale: ScaleState, plotBox: BBox, pxRatio: number, i0: number, i1: number): void;
|
|
8
|
-
//# sourceMappingURL=drawBands.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drawBands.d.ts","sourceRoot":"","sources":["../../src/rendering/drawBands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGjD;;;GAGG;AACH,wBAAgB,QAAQ,CACtB,GAAG,EAAE,wBAAwB,EAC7B,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,EACxB,MAAM,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAChC,MAAM,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAChC,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,MAAM,EACf,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,GACT,IAAI,CA+CN"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { CursorState, ScaleState, BBox } from '../types';
|
|
2
|
-
import type { ChartData } from '../types/data';
|
|
3
|
-
import type { SeriesConfig } from '../types/series';
|
|
4
|
-
export interface CursorDrawConfig {
|
|
5
|
-
/** Crosshair line color */
|
|
6
|
-
stroke?: string;
|
|
7
|
-
/** Crosshair line width in CSS pixels */
|
|
8
|
-
width?: number;
|
|
9
|
-
/** Crosshair dash pattern */
|
|
10
|
-
dash?: number[];
|
|
11
|
-
/** Point indicator radius */
|
|
12
|
-
pointRadius?: number;
|
|
13
|
-
/** Whether to show X crosshair */
|
|
14
|
-
showX?: boolean;
|
|
15
|
-
/** Whether to show Y crosshair */
|
|
16
|
-
showY?: boolean;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Draw cursor crosshairs and point indicator.
|
|
20
|
-
*/
|
|
21
|
-
export declare function drawCursor(ctx: CanvasRenderingContext2D, cursor: CursorState, plotBox: BBox, pxRatio: number, data: ChartData, seriesConfigs: SeriesConfig[], getScale: (id: string) => ScaleState | undefined, getGroupXScaleKey: (groupIdx: number) => string | undefined, config?: CursorDrawConfig): void;
|
|
22
|
-
//# sourceMappingURL=drawCursor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drawCursor.d.ts","sourceRoot":"","sources":["../../src/rendering/drawCursor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAIpD,MAAM,WAAW,gBAAgB;IAC/B,2BAA2B;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6BAA6B;IAC7B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,6BAA6B;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,kCAAkC;IAClC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAWD;;GAEG;AACH,wBAAgB,UAAU,CACxB,GAAG,EAAE,wBAAwB,EAC7B,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,SAAS,EACf,aAAa,EAAE,YAAY,EAAE,EAC7B,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS,EAChD,iBAAiB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,EAC3D,MAAM,CAAC,EAAE,gBAAgB,GACxB,IAAI,CA8FN"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ScaleState, BBox } from '../types';
|
|
2
|
-
import type { PointsConfig } from '../types/series';
|
|
3
|
-
/**
|
|
4
|
-
* Draw hollow data-point circles for a series when zoomed in enough.
|
|
5
|
-
* Matches uPlot behavior: white fill + series stroke color.
|
|
6
|
-
*/
|
|
7
|
-
export declare function drawPoints(ctx: CanvasRenderingContext2D, dataX: ArrayLike<number>, dataY: ArrayLike<number | null>, xScale: ScaleState, yScale: ScaleState, plotBox: BBox, pxRatio: number, i0: number, i1: number, ptsCfg: PointsConfig | undefined, ptDia: number, seriesStroke: string): void;
|
|
8
|
-
/**
|
|
9
|
-
* Determine whether data points should be drawn for a series.
|
|
10
|
-
* Based on uPlot's seriesPointsShow logic: show when data density is low enough.
|
|
11
|
-
*/
|
|
12
|
-
export declare function shouldShowPoints(show: PointsConfig['show'], group: number, index: number, i0: number, i1: number, plotDim: number, ptSpace: number): boolean;
|
|
13
|
-
//# sourceMappingURL=drawPoints.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drawPoints.d.ts","sourceRoot":"","sources":["../../src/rendering/drawPoints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAIpD;;;GAGG;AACH,wBAAgB,UAAU,CACxB,GAAG,EAAE,wBAAwB,EAC7B,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,EACxB,KAAK,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAC/B,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,MAAM,EACf,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,YAAY,GAAG,SAAS,EAChC,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,GACnB,IAAI,CA+BN;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,EAC1B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAUT"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { SelectState, BBox } from '../types';
|
|
2
|
-
export interface SelectDrawConfig {
|
|
3
|
-
/** Fill color for selection rectangle */
|
|
4
|
-
fill?: string;
|
|
5
|
-
/** Stroke color for selection border */
|
|
6
|
-
stroke?: string;
|
|
7
|
-
/** Stroke width */
|
|
8
|
-
width?: number;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Draw the drag-to-zoom selection rectangle.
|
|
12
|
-
*/
|
|
13
|
-
export declare function drawSelection(ctx: CanvasRenderingContext2D, select: SelectState, plotBox: BBox, pxRatio: number, config?: SelectDrawConfig): void;
|
|
14
|
-
//# sourceMappingURL=drawSelect.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drawSelect.d.ts","sourceRoot":"","sources":["../../src/rendering/drawSelect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGlD,MAAM,WAAW,gBAAgB;IAC/B,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mBAAmB;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAQD;;GAEG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,wBAAwB,EAC7B,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,gBAAgB,GACxB,IAAI,CAuBN"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { SeriesConfig, BBox } from '../types';
|
|
2
|
-
import type { SeriesPaths } from '../paths/types';
|
|
3
|
-
/**
|
|
4
|
-
* Draw a single series onto the canvas context.
|
|
5
|
-
*/
|
|
6
|
-
export declare function drawSeriesPath(ctx: CanvasRenderingContext2D, config: SeriesConfig, paths: SeriesPaths, pxRatio: number, plotBox?: BBox): void;
|
|
7
|
-
//# sourceMappingURL=drawSeries.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drawSeries.d.ts","sourceRoot":"","sources":["../../src/rendering/drawSeries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AA2BlD;;GAEG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,wBAAwB,EAC7B,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,IAAI,GACb,IAAI,CA8CN"}
|
package/dist/sync/SyncGroup.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { ChartStore } from '../hooks/useChartStore';
|
|
2
|
-
/**
|
|
3
|
-
* Get or create a sync group by key.
|
|
4
|
-
* Charts with the same sync key share cursor position.
|
|
5
|
-
*/
|
|
6
|
-
export declare function getSyncGroup(key: string): SyncGroup;
|
|
7
|
-
/**
|
|
8
|
-
* Pub/sub group for synchronizing cursor position across multiple charts.
|
|
9
|
-
* Charts publish their cursor's x-value, and all other charts in the group
|
|
10
|
-
* move their cursor to match.
|
|
11
|
-
*
|
|
12
|
-
* Two-layer loop prevention:
|
|
13
|
-
* 1. `publishing` flag blocks re-entrant synchronous calls
|
|
14
|
-
* 2. `syncedStores` WeakSet blocks stores that were just synced-to
|
|
15
|
-
* from echoing back on their next async redraw
|
|
16
|
-
*/
|
|
17
|
-
export declare class SyncGroup {
|
|
18
|
-
readonly key: string;
|
|
19
|
-
private members;
|
|
20
|
-
private publishing;
|
|
21
|
-
private syncedStores;
|
|
22
|
-
constructor(key: string);
|
|
23
|
-
/** Add a chart to this sync group. */
|
|
24
|
-
join(store: ChartStore): void;
|
|
25
|
-
/** Remove a chart from this sync group. Cleans up empty groups. */
|
|
26
|
-
leave(store: ChartStore): void;
|
|
27
|
-
/**
|
|
28
|
-
* Publish cursor position from one chart to all others in the group.
|
|
29
|
-
* Skips if the source was just synced-to (prevents async echo loops).
|
|
30
|
-
*/
|
|
31
|
-
pub(source: ChartStore): void;
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=SyncGroup.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SyncGroup.d.ts","sourceRoot":"","sources":["../../src/sync/SyncGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAKzD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAOnD;AAED;;;;;;;;;GASG;AACH,qBAAa,SAAS;IACpB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,OAAO,CAA8B;IAC7C,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,YAAY,CAA6B;gBAErC,GAAG,EAAE,MAAM;IAIvB,sCAAsC;IACtC,IAAI,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAI7B,mEAAmE;IACnE,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAO9B;;;OAGG;IACH,GAAG,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;CA4C9B"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ChartStore } from '../hooks/useChartStore';
|
|
2
|
-
/**
|
|
3
|
-
* Hook that joins a chart to a sync group for cursor synchronization.
|
|
4
|
-
* Charts with the same syncKey will have their cursors linked.
|
|
5
|
-
* Only publishes when cursor state actually changes to prevent infinite loops.
|
|
6
|
-
*/
|
|
7
|
-
export declare function useSyncGroup(store: ChartStore, syncKey: string | undefined): void;
|
|
8
|
-
//# sourceMappingURL=useSyncGroup.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useSyncGroup.d.ts","sourceRoot":"","sources":["../../src/sync/useSyncGroup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGzD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAwBjF"}
|
package/dist/time/fmtDate.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Date formatting utilities for time-scale axes.
|
|
3
|
-
* Uses Intl.DateTimeFormat for timezone-aware formatting.
|
|
4
|
-
*/
|
|
5
|
-
/** Format a timestamp (seconds) as a date string using Intl.DateTimeFormat options. */
|
|
6
|
-
export declare function fmtDate(ts: number, opts: Intl.DateTimeFormatOptions, tz?: string): string;
|
|
7
|
-
/** Compact formatters for common time axis label patterns. */
|
|
8
|
-
export declare function fmtFullDateTime(ts: number, tz?: string): string;
|
|
9
|
-
export declare function fmtDateOnly(ts: number, tz?: string): string;
|
|
10
|
-
export declare function fmtTimeOnly(ts: number, tz?: string): string;
|
|
11
|
-
export declare function fmtHourMinute(ts: number, tz?: string): string;
|
|
12
|
-
export declare function fmtMonthDay(ts: number, tz?: string): string;
|
|
13
|
-
export declare function fmtYear(ts: number, tz?: string): string;
|
|
14
|
-
export declare function fmtMonthYear(ts: number, tz?: string): string;
|
|
15
|
-
//# sourceMappingURL=fmtDate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fmtDate.d.ts","sourceRoot":"","sources":["../../src/time/fmtDate.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAcH,uFAAuF;AACvF,wBAAgB,OAAO,CACrB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,IAAI,CAAC,qBAAqB,EAChC,EAAE,CAAC,EAAE,MAAM,GACV,MAAM,CAGR;AAED,8DAA8D;AAC9D,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAE5D"}
|