react-native-livechart 3.12.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/BadgeOverlay.d.ts +9 -1
- package/dist/components/BadgeOverlay.d.ts.map +1 -1
- package/dist/components/ChartOverlayLayer.d.ts +19 -0
- package/dist/components/ChartOverlayLayer.d.ts.map +1 -0
- package/dist/components/CustomMarkerOverlay.d.ts +16 -6
- package/dist/components/CustomMarkerOverlay.d.ts.map +1 -1
- package/dist/components/CustomReferenceLineOverlay.d.ts +36 -0
- package/dist/components/CustomReferenceLineOverlay.d.ts.map +1 -0
- package/dist/components/CustomTooltipOverlay.d.ts +5 -2
- package/dist/components/CustomTooltipOverlay.d.ts.map +1 -1
- package/dist/components/DotOverlay.d.ts +7 -1
- package/dist/components/DotOverlay.d.ts.map +1 -1
- package/dist/components/LiveChart.d.ts.map +1 -1
- package/dist/components/LiveChartSeries.d.ts.map +1 -1
- package/dist/components/MarkerOverlay.d.ts +6 -3
- package/dist/components/MarkerOverlay.d.ts.map +1 -1
- package/dist/components/MultiSeriesDots.d.ts +4 -1
- package/dist/components/MultiSeriesDots.d.ts.map +1 -1
- package/dist/components/ReferenceLineGroupOverlay.d.ts +27 -0
- package/dist/components/ReferenceLineGroupOverlay.d.ts.map +1 -0
- package/dist/components/ReferenceLineOverlay.d.ts +25 -2
- package/dist/components/ReferenceLineOverlay.d.ts.map +1 -1
- package/dist/components/XAxisOverlay.d.ts +7 -1
- package/dist/components/XAxisOverlay.d.ts.map +1 -1
- package/dist/components/YAxisOverlay.d.ts +12 -1
- package/dist/components/YAxisOverlay.d.ts.map +1 -1
- package/dist/constants.d.ts +13 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/core/liveChartEngineTick.d.ts +29 -0
- package/dist/core/liveChartEngineTick.d.ts.map +1 -1
- package/dist/core/liveChartSeriesEngineTick.d.ts +18 -0
- package/dist/core/liveChartSeriesEngineTick.d.ts.map +1 -1
- package/dist/core/resolveConfig.d.ts +62 -2
- package/dist/core/resolveConfig.d.ts.map +1 -1
- package/dist/core/useLiveChartEngine.d.ts +58 -7
- package/dist/core/useLiveChartEngine.d.ts.map +1 -1
- package/dist/core/useLiveChartSeriesEngine.d.ts +8 -2
- package/dist/core/useLiveChartSeriesEngine.d.ts.map +1 -1
- package/dist/draw/grid.d.ts +13 -1
- package/dist/draw/grid.d.ts.map +1 -1
- package/dist/draw/markerAtlas.d.ts +20 -2
- package/dist/draw/markerAtlas.d.ts.map +1 -1
- package/dist/draw/volume.d.ts +25 -0
- package/dist/draw/volume.d.ts.map +1 -0
- package/dist/hooks/crosshairShared.d.ts +12 -6
- package/dist/hooks/crosshairShared.d.ts.map +1 -1
- package/dist/hooks/overlayScale.d.ts +22 -0
- package/dist/hooks/overlayScale.d.ts.map +1 -0
- package/dist/hooks/resolveChartLayout.d.ts +9 -0
- package/dist/hooks/resolveChartLayout.d.ts.map +1 -1
- package/dist/hooks/useBadge.d.ts +22 -1
- package/dist/hooks/useBadge.d.ts.map +1 -1
- package/dist/hooks/useCandlePaths.d.ts +6 -0
- package/dist/hooks/useCandlePaths.d.ts.map +1 -1
- package/dist/hooks/useChartOverlayContext.d.ts +45 -0
- package/dist/hooks/useChartOverlayContext.d.ts.map +1 -0
- package/dist/hooks/useChartPaths.d.ts +8 -1
- package/dist/hooks/useChartPaths.d.ts.map +1 -1
- package/dist/hooks/useCrosshair.d.ts +9 -2
- package/dist/hooks/useCrosshair.d.ts.map +1 -1
- package/dist/hooks/useLiveDot.d.ts +6 -1
- package/dist/hooks/useLiveDot.d.ts.map +1 -1
- package/dist/hooks/useMarkers.d.ts +9 -4
- package/dist/hooks/useMarkers.d.ts.map +1 -1
- package/dist/hooks/usePanScroll.d.ts +82 -0
- package/dist/hooks/usePanScroll.d.ts.map +1 -0
- package/dist/hooks/usePinchZoom.d.ts +74 -0
- package/dist/hooks/usePinchZoom.d.ts.map +1 -0
- package/dist/hooks/useReferenceDrag.d.ts +24 -0
- package/dist/hooks/useReferenceDrag.d.ts.map +1 -0
- package/dist/hooks/useReferenceLine.d.ts +23 -4
- package/dist/hooks/useReferenceLine.d.ts.map +1 -1
- package/dist/hooks/useReferenceLinePress.d.ts +5 -1
- package/dist/hooks/useReferenceLinePress.d.ts.map +1 -1
- package/dist/hooks/useVisibleRange.d.ts +39 -0
- package/dist/hooks/useVisibleRange.d.ts.map +1 -0
- package/dist/hooks/useYAxis.d.ts +1 -1
- package/dist/hooks/useYAxis.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/math/markerCluster.d.ts +47 -0
- package/dist/math/markerCluster.d.ts.map +1 -0
- package/dist/math/markers.d.ts +10 -0
- package/dist/math/markers.d.ts.map +1 -1
- package/dist/math/referenceDrag.d.ts +24 -0
- package/dist/math/referenceDrag.d.ts.map +1 -0
- package/dist/math/referenceGroup.d.ts +31 -0
- package/dist/math/referenceGroup.d.ts.map +1 -0
- package/dist/math/referenceLines.d.ts +33 -7
- package/dist/math/referenceLines.d.ts.map +1 -1
- package/dist/types.d.ts +524 -21
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/BadgeOverlay.tsx +26 -1
- package/src/components/ChartOverlayLayer.tsx +32 -0
- package/src/components/CustomMarkerOverlay.tsx +150 -57
- package/src/components/CustomReferenceLineOverlay.tsx +250 -0
- package/src/components/CustomTooltipOverlay.tsx +27 -7
- package/src/components/DotOverlay.tsx +9 -0
- package/src/components/LiveChart.tsx +550 -32
- package/src/components/LiveChartSeries.tsx +111 -5
- package/src/components/MarkerOverlay.tsx +92 -6
- package/src/components/MultiSeriesDots.tsx +12 -3
- package/src/components/ReferenceLineGroupOverlay.tsx +207 -0
- package/src/components/ReferenceLineOverlay.tsx +105 -32
- package/src/components/XAxisOverlay.tsx +9 -2
- package/src/components/YAxisOverlay.tsx +49 -28
- package/src/constants.ts +17 -0
- package/src/core/liveChartEngineTick.ts +81 -8
- package/src/core/liveChartSeriesEngineTick.ts +50 -9
- package/src/core/resolveConfig.ts +133 -2
- package/src/core/useLiveChartEngine.ts +111 -11
- package/src/core/useLiveChartSeriesEngine.ts +26 -3
- package/src/draw/grid.ts +71 -2
- package/src/draw/markerAtlas.ts +117 -3
- package/src/draw/volume.ts +190 -0
- package/src/hooks/crosshairShared.ts +37 -9
- package/src/hooks/overlayScale.ts +59 -0
- package/src/hooks/resolveChartLayout.ts +33 -0
- package/src/hooks/useBadge.ts +89 -21
- package/src/hooks/useCandlePaths.ts +104 -7
- package/src/hooks/useChartOverlayContext.ts +93 -0
- package/src/hooks/useChartPaths.ts +14 -1
- package/src/hooks/useCrosshair.ts +33 -2
- package/src/hooks/useLiveDot.ts +16 -5
- package/src/hooks/useMarkers.ts +39 -11
- package/src/hooks/usePanScroll.ts +253 -0
- package/src/hooks/usePinchZoom.ts +189 -0
- package/src/hooks/useReferenceDrag.ts +254 -0
- package/src/hooks/useReferenceLine.ts +56 -9
- package/src/hooks/useReferenceLinePress.ts +16 -2
- package/src/hooks/useVisibleRange.ts +119 -0
- package/src/hooks/useYAxis.ts +2 -0
- package/src/index.ts +17 -1
- package/src/math/markerCluster.ts +214 -0
- package/src/math/markers.ts +35 -3
- package/src/math/referenceDrag.ts +66 -0
- package/src/math/referenceGroup.ts +65 -0
- package/src/math/referenceLines.ts +76 -19
- package/src/types.ts +544 -21
|
@@ -8,9 +8,17 @@ interface BadgeData {
|
|
|
8
8
|
bgColor: string;
|
|
9
9
|
textColor: string;
|
|
10
10
|
}
|
|
11
|
-
export declare function BadgeOverlay({ badge, font, }: {
|
|
11
|
+
export declare function BadgeOverlay({ badge, font, borderColor, borderWidth, offsetX, offsetY, }: {
|
|
12
12
|
badge: SharedValue<BadgeData>;
|
|
13
13
|
font: SkFont;
|
|
14
|
+
/** Pill border color. When unset, no border is drawn. */
|
|
15
|
+
borderColor?: string;
|
|
16
|
+
/** Border stroke width (px) — only used when `borderColor` is set. */
|
|
17
|
+
borderWidth?: number;
|
|
18
|
+
/** Horizontal nudge from the badge's anchor (px). */
|
|
19
|
+
offsetX?: number;
|
|
20
|
+
/** Vertical nudge from the badge's anchor (px). */
|
|
21
|
+
offsetY?: number;
|
|
14
22
|
}): import("react").JSX.Element;
|
|
15
23
|
export {};
|
|
16
24
|
//# sourceMappingURL=BadgeOverlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeOverlay.d.ts","sourceRoot":"","sources":["../../src/components/BadgeOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,MAAM,EACX,KAAK,MAAM,EACZ,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE5E,UAAU,SAAS;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,IAAI,
|
|
1
|
+
{"version":3,"file":"BadgeOverlay.d.ts","sourceRoot":"","sources":["../../src/components/BadgeOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,MAAM,EACX,KAAK,MAAM,EACZ,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE5E,UAAU,SAAS;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,IAAI,EACJ,WAAW,EACX,WAAe,EACf,OAAW,EACX,OAAW,GACZ,EAAE;IACD,KAAK,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sEAAsE;IACtE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,+BA2BA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
import type { ChartOverlayContext } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* React Native overlay (NOT Skia) that floats a consumer's `renderOverlay` element
|
|
5
|
+
* tree over the Skia canvas — the same escape-hatch model as
|
|
6
|
+
* {@link CustomMarkerOverlay} / {@link CustomTooltipOverlay}. The consumer is
|
|
7
|
+
* handed the {@link ChartOverlayContext} (worklet price↔pixel / time↔pixel
|
|
8
|
+
* mappings + the live plot rect) and positions its own pieces on the UI thread.
|
|
9
|
+
*
|
|
10
|
+
* The element is wrapped full-bleed with `pointerEvents="box-none"` so empty areas
|
|
11
|
+
* fall through to the chart's scrub gesture while an interactive leaf inside the
|
|
12
|
+
* overlay can still receive touches. `render` is called on the JS thread per React
|
|
13
|
+
* render; the returned tree then tracks the axis via the context's SharedValues.
|
|
14
|
+
*/
|
|
15
|
+
export declare function ChartOverlayLayer({ render, context, }: {
|
|
16
|
+
render: (ctx: ChartOverlayContext) => ReactElement | null | undefined;
|
|
17
|
+
context: ChartOverlayContext;
|
|
18
|
+
}): import("react").JSX.Element | null;
|
|
19
|
+
//# sourceMappingURL=ChartOverlayLayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartOverlayLayer.d.ts","sourceRoot":"","sources":["../../src/components/ChartOverlayLayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,OAAO,GACR,EAAE;IACD,MAAM,EAAE,CAAC,GAAG,EAAE,mBAAmB,KAAK,YAAY,GAAG,IAAI,GAAG,SAAS,CAAC;IACtE,OAAO,EAAE,mBAAmB,CAAC;CAC9B,sCAQA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type SharedValue } from "react-native-reanimated";
|
|
2
2
|
import type { ChartEngineLayout } from "../core/useLiveChartEngine";
|
|
3
3
|
import type { ChartPadding } from "../draw/line";
|
|
4
|
-
import
|
|
4
|
+
import { type ResolvedMarkerCluster } from "../math/markerCluster";
|
|
5
|
+
import type { LiveChartPoint, Marker, MarkerRenderContext, SeriesConfig } from "../types";
|
|
5
6
|
/**
|
|
6
7
|
* React Native overlay (NOT Skia) that floats `renderMarker` elements over the
|
|
7
8
|
* Skia canvas, one per marker the consumer chooses to customize. Rendered as a
|
|
@@ -10,13 +11,20 @@ import type { LiveChartPoint, Marker, SeriesConfig } from "../types";
|
|
|
10
11
|
* crisp at native resolution instead of being rasterized into the marker atlas.
|
|
11
12
|
*
|
|
12
13
|
* The set of markers is mirrored to JS state via `markersSignature` (same as
|
|
13
|
-
* `MarkerOverlay`); `renderMarker` is then called per marker on the
|
|
14
|
-
* Markers it returns an element for are excluded from the Skia atlas
|
|
15
|
-
* there's no double-draw.
|
|
14
|
+
* `MarkerOverlay`); `renderMarker(marker, ctx)` is then called per marker on the
|
|
15
|
+
* JS thread. Markers it returns an element for are excluded from the Skia atlas
|
|
16
|
+
* upstream, so there's no double-draw.
|
|
17
|
+
*
|
|
18
|
+
* Custom views participate in {@link clusterMarkers}: a single per-frame
|
|
19
|
+
* project+cluster over all markers feeds a `posById` map so co-located custom
|
|
20
|
+
* views fan apart (or hide when their cluster collapses) in lockstep with the
|
|
21
|
+
* atlas markers. `renderMarker` must return an element consistently for a given
|
|
22
|
+
* id (it may restyle via `ctx`, but should not flip between element and `null`
|
|
23
|
+
* based on `ctx.isGrouped`).
|
|
16
24
|
*/
|
|
17
|
-
export declare function CustomMarkerOverlay({ markers, renderMarker, engine, padding, series, lineData, lineLinear, }: {
|
|
25
|
+
export declare function CustomMarkerOverlay({ markers, renderMarker, engine, padding, series, lineData, lineLinear, cluster, }: {
|
|
18
26
|
markers: SharedValue<Marker[]>;
|
|
19
|
-
renderMarker: (marker: Marker) => React.ReactElement | null | undefined;
|
|
27
|
+
renderMarker: (marker: Marker, ctx: MarkerRenderContext) => React.ReactElement | null | undefined;
|
|
20
28
|
engine: ChartEngineLayout;
|
|
21
29
|
padding: ChartPadding;
|
|
22
30
|
/** Multi-series data, used to anchor markers by `seriesId`. */
|
|
@@ -25,5 +33,7 @@ export declare function CustomMarkerOverlay({ markers, renderMarker, engine, pad
|
|
|
25
33
|
lineData?: SharedValue<LiveChartPoint[]>;
|
|
26
34
|
/** Single-series line is drawn linear — anchor `lineData` markers on the chord. */
|
|
27
35
|
lineLinear?: boolean;
|
|
36
|
+
/** Collision config; `"stacked"` fans/collapses co-located markers. */
|
|
37
|
+
cluster: ResolvedMarkerCluster;
|
|
28
38
|
}): import("react").JSX.Element | null;
|
|
29
39
|
//# sourceMappingURL=CustomMarkerOverlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomMarkerOverlay.d.ts","sourceRoot":"","sources":["../../src/components/CustomMarkerOverlay.tsx"],"names":[],"mappings":"AAEA,OAAiB,EAKf,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"CustomMarkerOverlay.d.ts","sourceRoot":"","sources":["../../src/components/CustomMarkerOverlay.tsx"],"names":[],"mappings":"AAEA,OAAiB,EAKf,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAMjD,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,cAAc,EACd,MAAM,EACN,mBAAmB,EACnB,YAAY,EACb,MAAM,UAAU,CAAC;AA8DlB;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,OAAO,EACP,YAAY,EACZ,MAAM,EACN,OAAO,EACP,MAAM,EACN,QAAQ,EACR,UAAU,EACV,OAAO,GACR,EAAE;IACD,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC;IAC/B,YAAY,EAAE,CACZ,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,mBAAmB,KACrB,KAAK,CAAC,YAAY,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,MAAM,EAAE,iBAAiB,CAAC;IAC1B,OAAO,EAAE,YAAY,CAAC;IACtB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,WAAW,CAAC,YAAY,EAAE,CAAC,CAAC;IACrC,kEAAkE;IAClE,QAAQ,CAAC,EAAE,WAAW,CAAC,cAAc,EAAE,CAAC,CAAC;IACzC,mFAAmF;IACnF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,uEAAuE;IACvE,OAAO,EAAE,qBAAqB,CAAC;CAChC,sCAiIA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type SharedValue } from "react-native-reanimated";
|
|
2
|
+
import type { ChartEngineLayout } from "../core/useLiveChartEngine";
|
|
3
|
+
import type { ChartPadding } from "../draw/line";
|
|
4
|
+
import type { ReferenceLine, ReferenceLineRenderProps } from "../types";
|
|
5
|
+
/**
|
|
6
|
+
* Which Form-A reference lines a `renderReferenceLine` returns an element for —
|
|
7
|
+
* the set whose built-in Skia tag is suppressed (so there's no double-draw). The
|
|
8
|
+
* render fn is probed with placeholder SharedValues; it must decide null-ness from
|
|
9
|
+
* `line` / `index`, not from live values (mirrors how `renderMarker` is probed for
|
|
10
|
+
* the marker-atlas exclusion set). Index-aligned with `lines`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function customReferenceLineFlags(lines: ReferenceLine[], render?: (ctx: ReferenceLineRenderProps) => React.ReactElement | null | undefined): boolean[];
|
|
13
|
+
/**
|
|
14
|
+
* React Native overlay (NOT Skia) that floats `renderReferenceLine` elements over
|
|
15
|
+
* the canvas, one per Form-A line the consumer customizes. Rendered as a sibling
|
|
16
|
+
* of `<Canvas>` (like {@link CustomMarkerOverlay}) so the tags can be any RN view
|
|
17
|
+
* and stay crisp at native resolution. Lines whose render returns an element have
|
|
18
|
+
* their built-in Skia tag suppressed upstream (see {@link customReferenceLineFlags}),
|
|
19
|
+
* so there's no double-draw.
|
|
20
|
+
*/
|
|
21
|
+
export declare function CustomReferenceLineOverlay({ lines, renderReferenceLine, custom, engine, padding, formatValue, dragValues, dragActive, }: {
|
|
22
|
+
lines: ReferenceLine[];
|
|
23
|
+
renderReferenceLine: (ctx: ReferenceLineRenderProps) => React.ReactElement | null | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Index-aligned flags (from {@link customReferenceLineFlags}) marking which
|
|
26
|
+
* lines the render owns — only these get a floated view, matching the built-in
|
|
27
|
+
* tags suppressed upstream. Avoids re-probing the render here.
|
|
28
|
+
*/
|
|
29
|
+
custom: boolean[];
|
|
30
|
+
engine: ChartEngineLayout;
|
|
31
|
+
padding: ChartPadding;
|
|
32
|
+
formatValue: (v: number) => string;
|
|
33
|
+
dragValues: SharedValue<number[]>;
|
|
34
|
+
dragActive: SharedValue<boolean[]>;
|
|
35
|
+
}): import("react").JSX.Element | null;
|
|
36
|
+
//# sourceMappingURL=CustomReferenceLineOverlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomReferenceLineOverlay.d.ts","sourceRoot":"","sources":["../../src/components/CustomReferenceLineOverlay.tsx"],"names":[],"mappings":"AACA,OAAiB,EAIf,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAOjD,OAAO,KAAK,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAyBxE;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,aAAa,EAAE,EACtB,MAAM,CAAC,EAAE,CACP,GAAG,EAAE,wBAAwB,KAC1B,KAAK,CAAC,YAAY,GAAG,IAAI,GAAG,SAAS,GACzC,OAAO,EAAE,CAiBX;AAoHD;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,KAAK,EACL,mBAAmB,EACnB,MAAM,EACN,MAAM,EACN,OAAO,EACP,WAAW,EACX,UAAU,EACV,UAAU,GACX,EAAE;IACD,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,mBAAmB,EAAE,CACnB,GAAG,EAAE,wBAAwB,KAC1B,KAAK,CAAC,YAAY,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C;;;;OAIG;IACH,MAAM,EAAE,OAAO,EAAE,CAAC;IAClB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,OAAO,EAAE,YAAY,CAAC;IACtB,WAAW,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IACnC,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC;IAClC,UAAU,EAAE,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC;CACpC,sCAyBA"}
|
|
@@ -20,7 +20,7 @@ import type { CandlePoint, TooltipRenderProps } from "../types";
|
|
|
20
20
|
* area (and any non-interactive tooltip body) while still allowing an
|
|
21
21
|
* interactive leaf inside the custom element to be tapped.
|
|
22
22
|
*/
|
|
23
|
-
export declare function CustomTooltipOverlay({ renderTooltip, scrubX, scrubValue, scrubTime, scrubActive, scrubCandle, crosshairOpacity, tooltipLayout, engine, padding, placement, margin, lineTop, }: {
|
|
23
|
+
export declare function CustomTooltipOverlay({ renderTooltip, scrubX, scrubValue, scrubTime, scrubActive, scrubCandle, crosshairOpacity, tooltipLayout, engine, padding, placement, margin, lineTop, scrubDotY, }: {
|
|
24
24
|
renderTooltip: (ctx: TooltipRenderProps) => React.ReactElement | null | undefined;
|
|
25
25
|
scrubX: SharedValue<number>;
|
|
26
26
|
scrubValue: SharedValue<number | null>;
|
|
@@ -32,12 +32,15 @@ export declare function CustomTooltipOverlay({ renderTooltip, scrubX, scrubValue
|
|
|
32
32
|
tooltipLayout: SharedValue<TooltipLayout>;
|
|
33
33
|
engine: ChartEngineLayout;
|
|
34
34
|
padding: ChartPadding;
|
|
35
|
-
placement: "side" | "top" | "bottom";
|
|
35
|
+
placement: "side" | "top" | "bottom" | "point";
|
|
36
36
|
/** Gap (px) between the pill and the plot edge it's pinned to. Default 8. */
|
|
37
37
|
margin?: number;
|
|
38
38
|
/** When `placement` is `"top"`, the overlay publishes the label's bottom edge
|
|
39
39
|
* (canvas Y) here so {@link CrosshairOverlay} can stop the crosshair line at
|
|
40
40
|
* the label instead of running through it; -1 when not top-pinned/active. */
|
|
41
41
|
lineTop?: SharedValue<number>;
|
|
42
|
+
/** Scrub intersection Y in canvas px (the value the dot marks) — the anchor
|
|
43
|
+
* for `"point"` placement. Omitted / -1 falls back to a top pin. */
|
|
44
|
+
scrubDotY?: SharedValue<number>;
|
|
42
45
|
}): import("react").JSX.Element | null;
|
|
43
46
|
//# sourceMappingURL=CustomTooltipOverlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomTooltipOverlay.d.ts","sourceRoot":"","sources":["../../src/components/CustomTooltipOverlay.tsx"],"names":[],"mappings":"AACA,OAAiB,EAIf,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAQhE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,aAAa,EACb,MAAM,EACN,UAAU,EACV,SAAS,EACT,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,MAAM,EACN,OAAO,EACP,SAAS,EACT,MAAU,EACV,OAAO,
|
|
1
|
+
{"version":3,"file":"CustomTooltipOverlay.d.ts","sourceRoot":"","sources":["../../src/components/CustomTooltipOverlay.tsx"],"names":[],"mappings":"AACA,OAAiB,EAIf,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAQhE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,aAAa,EACb,MAAM,EACN,UAAU,EACV,SAAS,EACT,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,MAAM,EACN,OAAO,EACP,SAAS,EACT,MAAU,EACV,OAAO,EACP,SAAS,GACV,EAAE;IACD,aAAa,EAAE,CAAC,GAAG,EAAE,kBAAkB,KAAK,KAAK,CAAC,YAAY,GAAG,IAAI,GAAG,SAAS,CAAC;IAClF,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC5B,UAAU,EAAE,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACvC,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC/B,WAAW,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAClC,kFAAkF;IAClF,WAAW,CAAC,EAAE,WAAW,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC9C,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACtC,aAAa,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC;IAC1C,MAAM,EAAE,iBAAiB,CAAC;IAC1B,OAAO,EAAE,YAAY,CAAC;IACtB,SAAS,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC/C,6EAA6E;IAC7E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;kFAE8E;IAC9E,OAAO,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC9B;yEACqE;IACrE,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACjC,sCAqGA"}
|
|
@@ -8,7 +8,7 @@ import type { ChartEngineLayout } from "../core/useLiveChartEngine";
|
|
|
8
8
|
* `pulse.maxRadius` / `pulse.strokeWidth`; chart padding reserves the same outer
|
|
9
9
|
* extent via `pulseRadialOutset` in `draw/line.ts` (see `resolveChartLayout`).
|
|
10
10
|
*/
|
|
11
|
-
export declare function DotOverlay({ dotX, dotY, palette, engine, pulse, radius, ring, color, }: {
|
|
11
|
+
export declare function DotOverlay({ dotX, dotY, palette, engine, pulse, radius, ring, color, viewEnd, }: {
|
|
12
12
|
dotX: SharedValue<number>;
|
|
13
13
|
dotY: SharedValue<number>;
|
|
14
14
|
palette: LiveChartPalette;
|
|
@@ -20,5 +20,11 @@ export declare function DotOverlay({ dotX, dotY, palette, engine, pulse, radius,
|
|
|
20
20
|
ring: ResolvedDotRingConfig | null;
|
|
21
21
|
/** Dot (and pulse) fill color; falls back to the chart line color. */
|
|
22
22
|
color: string | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Time-scroll right edge (`null` = following live). While scrolled back the
|
|
25
|
+
* pulse is suppressed — it's driven by the (now frozen) view timestamp, so it
|
|
26
|
+
* would stick or flicker, and a "live" heartbeat on a historical point is wrong.
|
|
27
|
+
*/
|
|
28
|
+
viewEnd?: SharedValue<number | null>;
|
|
23
29
|
}): import("react").JSX.Element;
|
|
24
30
|
//# sourceMappingURL=DotOverlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DotOverlay.d.ts","sourceRoot":"","sources":["../../src/components/DotOverlay.tsx"],"names":[],"mappings":"AACA,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAIpE;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,MAAM,EACN,KAAK,EACL,MAAM,EACN,IAAI,EACJ,KAAK,
|
|
1
|
+
{"version":3,"file":"DotOverlay.d.ts","sourceRoot":"","sources":["../../src/components/DotOverlay.tsx"],"names":[],"mappings":"AACA,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAIpE;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,MAAM,EACN,KAAK,EACL,MAAM,EACN,IAAI,EACJ,KAAK,EACL,OAAO,GACR,EAAE;IACD,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1B,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1B,OAAO,EAAE,gBAAgB,CAAC;IAC1B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,KAAK,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAClC,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,iDAAiD;IACjD,IAAI,EAAE,qBAAqB,GAAG,IAAI,CAAC;IACnC,sEAAsE;IACtE,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACtC,+BA+CA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LiveChart.d.ts","sourceRoot":"","sources":["../../src/components/LiveChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LiveChart.d.ts","sourceRoot":"","sources":["../../src/components/LiveChart.tsx"],"names":[],"mappings":"AAqGA,OAAO,KAAK,EAEV,cAAc,EAGf,MAAM,UAAU,CAAC;AAqqDlB,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,+BAmK9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LiveChartSeries.d.ts","sourceRoot":"","sources":["../../src/components/LiveChartSeries.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LiveChartSeries.d.ts","sourceRoot":"","sources":["../../src/components/LiveChartSeries.tsx"],"names":[],"mappings":"AAwEA,OAAO,KAAK,EAAE,oBAAoB,EAAwB,MAAM,UAAU,CAAC;AA6pB3E,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,+BAkJ1D"}
|
|
@@ -2,7 +2,8 @@ import { type SkFont } from "@shopify/react-native-skia";
|
|
|
2
2
|
import { type SharedValue } from "react-native-reanimated";
|
|
3
3
|
import type { ChartEngineLayout } from "../core/useLiveChartEngine";
|
|
4
4
|
import type { ChartPadding } from "../draw/line";
|
|
5
|
-
import
|
|
5
|
+
import { type ResolvedMarkerCluster } from "../math/markerCluster";
|
|
6
|
+
import type { LiveChartPalette, LiveChartPoint, Marker, MarkerRenderContext, SeriesConfig } from "../types";
|
|
6
7
|
/**
|
|
7
8
|
* Renders the `markers` SharedValue as canvas glyphs.
|
|
8
9
|
*
|
|
@@ -15,7 +16,7 @@ import type { LiveChartPalette, LiveChartPoint, Marker, SeriesConfig } from "../
|
|
|
15
16
|
*
|
|
16
17
|
* Glyph precedence per marker: `image` → `icon` (text) → built-in `kind` shape.
|
|
17
18
|
*/
|
|
18
|
-
export declare function MarkerOverlay({ markers, engine, padding, palette, font, series, lineData, lineLinear, renderMarker, }: {
|
|
19
|
+
export declare function MarkerOverlay({ markers, engine, padding, palette, font, series, lineData, lineLinear, renderMarker, cluster, }: {
|
|
19
20
|
markers: SharedValue<Marker[]>;
|
|
20
21
|
engine: ChartEngineLayout;
|
|
21
22
|
padding: ChartPadding;
|
|
@@ -32,6 +33,8 @@ export declare function MarkerOverlay({ markers, engine, padding, palette, font,
|
|
|
32
33
|
* `CustomMarkerOverlay` instead — so they're excluded from the atlas here to
|
|
33
34
|
* avoid a (blurry) glyph drawn behind the custom element.
|
|
34
35
|
*/
|
|
35
|
-
renderMarker?: (marker: Marker) => unknown;
|
|
36
|
+
renderMarker?: (marker: Marker, ctx: MarkerRenderContext) => unknown;
|
|
37
|
+
/** Collision config; `"stacked"` fans/collapses co-located markers. */
|
|
38
|
+
cluster: ResolvedMarkerCluster;
|
|
36
39
|
}): import("react").JSX.Element;
|
|
37
40
|
//# sourceMappingURL=MarkerOverlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkerOverlay.d.ts","sourceRoot":"","sources":["../../src/components/MarkerOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,MAAM,EACZ,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"MarkerOverlay.d.ts","sourceRoot":"","sources":["../../src/components/MarkerOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,MAAM,EACZ,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAmBjD,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,MAAM,EACN,mBAAmB,EACnB,YAAY,EACb,MAAM,UAAU,CAAC;AAiGlB;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,MAAM,EACN,OAAO,EACP,OAAO,EACP,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,OAAO,GACR,EAAE;IACD,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC;IAC/B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,OAAO,EAAE,YAAY,CAAC;IACtB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,+DAA+D;IAC/D,MAAM,CAAC,EAAE,WAAW,CAAC,YAAY,EAAE,CAAC,CAAC;IACrC,kEAAkE;IAClE,QAAQ,CAAC,EAAE,WAAW,CAAC,cAAc,EAAE,CAAC,CAAC;IACzC,mFAAmF;IACnF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,mBAAmB,KAAK,OAAO,CAAC;IACrE,uEAAuE;IACvE,OAAO,EAAE,qBAAqB,CAAC;CAChC,+BAiOA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { type SharedValue } from "react-native-reanimated";
|
|
1
2
|
import type { ChartPadding } from "../draw/line";
|
|
2
3
|
import type { ResolvedDotRingConfig, ResolvedPulseConfig } from "../core/resolveConfig";
|
|
3
4
|
import type { MultiEngineState } from "../core/useLiveChartEngine";
|
|
4
|
-
export declare function MultiSeriesDots({ engine, padding, colors, radius, ring, ringColor, color, pulse, }: {
|
|
5
|
+
export declare function MultiSeriesDots({ engine, padding, colors, radius, ring, ringColor, color, pulse, viewEnd, }: {
|
|
5
6
|
engine: MultiEngineState;
|
|
6
7
|
padding: ChartPadding;
|
|
7
8
|
colors: string[];
|
|
@@ -13,5 +14,7 @@ export declare function MultiSeriesDots({ engine, padding, colors, radius, ring,
|
|
|
13
14
|
/** Fill color override; falls back to each series' line color. */
|
|
14
15
|
color: string | undefined;
|
|
15
16
|
pulse: ResolvedPulseConfig | null;
|
|
17
|
+
/** Pan/zoom right-edge override — pulse is frozen-out while scrolled back. */
|
|
18
|
+
viewEnd?: SharedValue<number | null>;
|
|
16
19
|
}): import("react").JSX.Element;
|
|
17
20
|
//# sourceMappingURL=MultiSeriesDots.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSeriesDots.d.ts","sourceRoot":"","sources":["../../src/components/MultiSeriesDots.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MultiSeriesDots.d.ts","sourceRoot":"","sources":["../../src/components/MultiSeriesDots.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAqGnE,wBAAgB,eAAe,CAAC,EAC9B,MAAM,EACN,OAAO,EACP,MAAM,EACN,MAAM,EACN,IAAI,EACJ,SAAS,EACT,KAAK,EACL,KAAK,EACL,OAAO,GACR,EAAE;IACD,MAAM,EAAE,gBAAgB,CAAC;IACzB,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,IAAI,EAAE,qBAAqB,GAAG,IAAI,CAAC;IACnC,6EAA6E;IAC7E,SAAS,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,KAAK,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAClC,8EAA8E;IAC9E,OAAO,CAAC,EAAE,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACtC,+BAmBA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type SkFont } from "@shopify/react-native-skia";
|
|
2
|
+
import { type SharedValue } from "react-native-reanimated";
|
|
3
|
+
import type { ChartPadding } from "../draw/line";
|
|
4
|
+
import type { ReferenceGrouping } from "../math/referenceGroup";
|
|
5
|
+
import type { ResolvedReferenceGroupBadge } from "../math/referenceLines";
|
|
6
|
+
import type { LiveChartPalette } from "../types";
|
|
7
|
+
/**
|
|
8
|
+
* Draws the collapsed-group count handles (e.g. a "×3" pill) for reference-line
|
|
9
|
+
* grouping — one pill per multi-line cluster, pinned to the plot at the cluster
|
|
10
|
+
* centroid. The individual tags of clustered lines are suppressed upstream (via
|
|
11
|
+
* `groupHidden`), so a stack of nearby orders reads as one handle. The pill uses the
|
|
12
|
+
* same style/shape config as a per-line badge (`badge`): `position`, `icon`,
|
|
13
|
+
* `text` (showText), `background` / `borderColor` / `borderWidth`, `radius` (corner),
|
|
14
|
+
* `textColor`, per-badge `font`, and `offsetX` / `offsetY`; the `format` fn maps the
|
|
15
|
+
* count to the label. A fixed slot pool keeps the Skia tree stable while the
|
|
16
|
+
* per-frame group count varies.
|
|
17
|
+
*/
|
|
18
|
+
export declare function ReferenceLineGroupOverlay({ grouping, padding, canvasWidth, palette, font, badge, format, }: {
|
|
19
|
+
grouping: SharedValue<ReferenceGrouping>;
|
|
20
|
+
padding: ChartPadding;
|
|
21
|
+
canvasWidth: SharedValue<number>;
|
|
22
|
+
palette: LiveChartPalette;
|
|
23
|
+
font: SkFont;
|
|
24
|
+
badge: ResolvedReferenceGroupBadge;
|
|
25
|
+
format?: (count: number) => string;
|
|
26
|
+
}): import("react").JSX.Element;
|
|
27
|
+
//# sourceMappingURL=ReferenceLineGroupOverlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReferenceLineGroupOverlay.d.ts","sourceRoot":"","sources":["../../src/components/ReferenceLineGroupOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,MAAM,EACZ,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AA+HjD;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,QAAQ,EACR,OAAO,EACP,WAAW,EACX,OAAO,EACP,IAAI,EACJ,KAAK,EACL,MAAM,GACP,EAAE;IACD,QAAQ,EAAE,WAAW,CAAC,iBAAiB,CAAC,CAAC;IACzC,OAAO,EAAE,YAAY,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC,OAAO,EAAE,gBAAgB,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,2BAA2B,CAAC;IACnC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CACpC,+BAwCA"}
|
|
@@ -1,20 +1,27 @@
|
|
|
1
1
|
import { type SkFont } from "@shopify/react-native-skia";
|
|
2
|
+
import { type SharedValue } from "react-native-reanimated";
|
|
2
3
|
import type { ChartEngineLayout } from "../core/useLiveChartEngine";
|
|
3
4
|
import type { ChartPadding } from "../draw/line";
|
|
4
|
-
import type { LiveChartPalette, ReferenceLine } from "../types";
|
|
5
|
+
import type { FontConfig, LiveChartPalette, ReferenceLine } from "../types";
|
|
5
6
|
/**
|
|
6
7
|
* Renders one reference line or band into the chart canvas. Handles all three
|
|
7
8
|
* `ReferenceLine` forms (horizontal line, horizontal value band, vertical time
|
|
8
9
|
* band) plus the Form-A pill badge (in-range tag + off-screen chevron pin).
|
|
9
10
|
* Self-contained so callers can `.map()` over a variable-length array.
|
|
10
11
|
*/
|
|
11
|
-
export declare function ReferenceLineOverlay({ engine, padding, line, palette, formatValue, font, badgeLayer, }: {
|
|
12
|
+
export declare function ReferenceLineOverlay({ engine, padding, line, palette, formatValue, font, fontProp, badgeLayer, suppressTag, groupHidden, dragValues, index, }: {
|
|
12
13
|
engine: ChartEngineLayout;
|
|
13
14
|
padding: ChartPadding;
|
|
14
15
|
line: ReferenceLine;
|
|
15
16
|
palette: LiveChartPalette;
|
|
16
17
|
formatValue: (v: number) => string;
|
|
17
18
|
font: SkFont;
|
|
19
|
+
/**
|
|
20
|
+
* The chart's raw font config — used to build a per-badge font when the line's
|
|
21
|
+
* {@link ReferenceLineBadgeConfig} sets `fontSize` / `fontFamily` / `fontWeight`.
|
|
22
|
+
* When no badge font knob is set, the resolved `font` is used as-is.
|
|
23
|
+
*/
|
|
24
|
+
fontProp?: FontConfig;
|
|
18
25
|
/**
|
|
19
26
|
* Render only the badge + label (`true`) or only the lines / bands (`false`,
|
|
20
27
|
* default). The caller draws the base pass behind the chart content and the
|
|
@@ -22,5 +29,21 @@ export declare function ReferenceLineOverlay({ engine, padding, line, palette, f
|
|
|
22
29
|
* of being erased by the fade's `dstOut` blend.
|
|
23
30
|
*/
|
|
24
31
|
badgeLayer?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Suppress the built-in tag (badge pill + connector + chevron + icon + gutter
|
|
34
|
+
* label) for this line — used when a custom `renderReferenceLine` element owns
|
|
35
|
+
* the tag. The line / band stroke still draws. No effect on the base pass.
|
|
36
|
+
*/
|
|
37
|
+
suppressTag?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Per-frame grouping flags (index-aligned): when this line's slot is `true` it's
|
|
40
|
+
* collapsed into a group count handle, so its tag is suppressed (the line / band
|
|
41
|
+
* stroke still draws).
|
|
42
|
+
*/
|
|
43
|
+
groupHidden?: SharedValue<boolean[]>;
|
|
44
|
+
/** Per-line live value overrides (dragged values), index-aligned with `referenceLines`. */
|
|
45
|
+
dragValues?: SharedValue<number[]>;
|
|
46
|
+
/** This line's index into {@link dragValues}. */
|
|
47
|
+
index?: number;
|
|
25
48
|
}): import("react").JSX.Element;
|
|
26
49
|
//# sourceMappingURL=ReferenceLineOverlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReferenceLineOverlay.d.ts","sourceRoot":"","sources":["../../src/components/ReferenceLineOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,MAAM,EACZ,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"ReferenceLineOverlay.d.ts","sourceRoot":"","sources":["../../src/components/ReferenceLineOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,MAAM,EACZ,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAMjD,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAS5E;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,MAAM,EACN,OAAO,EACP,IAAI,EACJ,OAAO,EACP,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,UAAkB,EAClB,WAAmB,EACnB,WAAW,EACX,UAAU,EACV,KAAS,GACV,EAAE;IACD,MAAM,EAAE,iBAAiB,CAAC;IAC1B,OAAO,EAAE,YAAY,CAAC;IACtB,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,WAAW,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC;IACrC,2FAA2F;IAC3F,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC;IACnC,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,+BAqSA"}
|
|
@@ -4,11 +4,17 @@ import type { ChartEngineLayout } from "../core/useLiveChartEngine";
|
|
|
4
4
|
import type { ChartPadding } from "../draw/line";
|
|
5
5
|
import type { XAxisEntry } from "../hooks/useXAxis";
|
|
6
6
|
import type { LiveChartPalette } from "../types";
|
|
7
|
-
export declare function XAxisOverlay({ entries, engine, padding, palette, font, }: {
|
|
7
|
+
export declare function XAxisOverlay({ entries, engine, padding, palette, font, volumeBandHeight, }: {
|
|
8
8
|
entries: SharedValue<XAxisEntry[]>;
|
|
9
9
|
engine: ChartEngineLayout;
|
|
10
10
|
padding: ChartPadding;
|
|
11
11
|
palette: LiveChartPalette;
|
|
12
12
|
font: SkFont;
|
|
13
|
+
/**
|
|
14
|
+
* Reserved volume-band height (px) folded into `padding.bottom`. The axis line
|
|
15
|
+
* + labels shift back down by this so they stay at the very bottom, below the
|
|
16
|
+
* band, while the price plot above shrinks. `0` = no band (default).
|
|
17
|
+
*/
|
|
18
|
+
volumeBandHeight?: number;
|
|
13
19
|
}): import("react").JSX.Element;
|
|
14
20
|
//# sourceMappingURL=XAxisOverlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XAxisOverlay.d.ts","sourceRoot":"","sources":["../../src/components/XAxisOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAOjD,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,MAAM,EACN,OAAO,EACP,OAAO,EACP,IAAI,
|
|
1
|
+
{"version":3,"file":"XAxisOverlay.d.ts","sourceRoot":"","sources":["../../src/components/XAxisOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAOjD,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,MAAM,EACN,OAAO,EACP,OAAO,EACP,IAAI,EACJ,gBAAoB,GACrB,EAAE;IACD,OAAO,EAAE,WAAW,CAAC,UAAU,EAAE,CAAC,CAAC;IACnC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,OAAO,EAAE,YAAY,CAAC;IACtB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,+BA8DA"}
|
|
@@ -5,7 +5,7 @@ import type { YAxisEntry } from "../draw/grid";
|
|
|
5
5
|
import { type ChartPadding } from "../draw/line";
|
|
6
6
|
import type { BadgeMetrics, LiveChartPalette } from "../types";
|
|
7
7
|
import type { ChartEngineLayout } from "../core/useLiveChartEngine";
|
|
8
|
-
export declare function YAxisOverlay({ entries, engine, padding, palette, font, badge, badgeTail, badgeMetrics, seriesLabelInset, gridStyle, }: {
|
|
8
|
+
export declare function YAxisOverlay({ entries, engine, padding, palette, font, badge, badgeTail, badgeMetrics, seriesLabelInset, gridStyle, variant, float, }: {
|
|
9
9
|
entries: SharedValue<YAxisEntry[]>;
|
|
10
10
|
engine: ChartEngineLayout;
|
|
11
11
|
padding: ChartPadding;
|
|
@@ -21,5 +21,16 @@ export declare function YAxisOverlay({ entries, engine, padding, palette, font,
|
|
|
21
21
|
seriesLabelInset?: number;
|
|
22
22
|
/** Grid-line styling overrides. Omit for the legacy solid 1px line. */
|
|
23
23
|
gridStyle?: ResolvedGridStyleConfig;
|
|
24
|
+
/**
|
|
25
|
+
* Which parts to draw. `"all"` (default) renders grid lines + labels together.
|
|
26
|
+
* `"grid"` / `"labels"` split them so a chart can draw the grid behind the data
|
|
27
|
+
* and the labels (over a soft fade) on top — see {@link YAxisEdgeFade}.
|
|
28
|
+
*/
|
|
29
|
+
variant?: "all" | "grid" | "labels";
|
|
30
|
+
/**
|
|
31
|
+
* Floating-axis mode: right-align labels at the canvas edge (over a full-width
|
|
32
|
+
* plot) instead of centering them in a reserved gutter. See {@link YAxisConfig.float}.
|
|
33
|
+
*/
|
|
34
|
+
float?: boolean;
|
|
24
35
|
}): import("react").JSX.Element;
|
|
25
36
|
//# sourceMappingURL=YAxisOverlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YAxisOverlay.d.ts","sourceRoot":"","sources":["../../src/components/YAxisOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,MAAM,EACZ,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE5E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAKL,KAAK,YAAY,EAClB,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"YAxisOverlay.d.ts","sourceRoot":"","sources":["../../src/components/YAxisOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,MAAM,EACZ,MAAM,4BAA4B,CAAC;AACpC,O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from "./types";
|
|
2
2
|
/** Milliseconds per frame at 60 fps — baseline for frame-rate-independent lerp. */
|
|
3
3
|
export declare const MS_PER_FRAME_60FPS = 16.67;
|
|
4
|
+
/**
|
|
5
|
+
* Size of the pre-allocated Y-axis label pool — the most price labels the axis
|
|
6
|
+
* ever renders at once. Caps both the dynamic (nice-interval) grid and the
|
|
7
|
+
* fixed-`count` mode (see {@link YAxisConfig.count}).
|
|
8
|
+
*/
|
|
9
|
+
export declare const MAX_Y_LABELS = 15;
|
|
10
|
+
/**
|
|
11
|
+
* Default press-and-hold (ms) before scrub engages in the `holdToScrub`
|
|
12
|
+
* time-scroll mode, so a quick one-finger drag scrolls instead. Overridden by
|
|
13
|
+
* `timeScroll.scrubHoldMs`, then `scrub.panGestureDelay`. Shared by `LiveChart`
|
|
14
|
+
* and `LiveChartSeries`.
|
|
15
|
+
*/
|
|
16
|
+
export declare const HOLD_TO_SCRUB_MS = 500;
|
|
4
17
|
/** Default value-badge pill geometry. */
|
|
5
18
|
export declare const BADGE_METRICS_DEFAULTS: BadgeMetrics;
|
|
6
19
|
/** Default candlestick body/wick geometry. */
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,aAAa,EACd,MAAM,SAAS,CAAC;AAEjB,mFAAmF;AACnF,eAAO,MAAM,kBAAkB,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,aAAa,EACd,MAAM,SAAS,CAAC;AAEjB,mFAAmF;AACnF,eAAO,MAAM,kBAAkB,QAAQ,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,YAAY,KAAK,CAAC;AAE/B;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAOpC,yCAAyC;AACzC,eAAO,MAAM,sBAAsB,EAAE,YAOpC,CAAC;AAEF,8CAA8C;AAC9C,eAAO,MAAM,uBAAuB,EAAE,aAMrC,CAAC;AAEF,6CAA6C;AAC7C,eAAO,MAAM,qBAAqB,EAAE,WAGnC,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,uBAAuB,EAAE,aAGrC,CAAC;AAEF,4CAA4C;AAC5C,eAAO,MAAM,4BAA4B,EAAE,iBAI1C,CAAC;AAGF,2EAA2E;AAC3E,eAAO,MAAM,gBAAgB,QAA8B,CAAC;AAC5D,wEAAwE;AACxE,eAAO,MAAM,gBAAgB,QAA8B,CAAC;AAC5D,mEAAmE;AACnE,eAAO,MAAM,cAAc,QAAoC,CAAC;AAChE,mEAAmE;AACnE,eAAO,MAAM,kBAAkB,QAAoC,CAAC;AACpE,uDAAuD;AACvD,eAAO,MAAM,aAAa,QAAgC,CAAC;AAE3D;;yDAEyD;AACzD,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC,+DAA+D;AAC/D,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,oDAAoD;AACpD,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC;;;;;GAKG;AACH,eAAO,MAAM,YAAY,IAAI,CAAC;AAE9B;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,YAAY,CAAC"}
|
|
@@ -5,6 +5,20 @@ export interface EngineTickMutable {
|
|
|
5
5
|
displayMax: number;
|
|
6
6
|
displayWindow: number;
|
|
7
7
|
timestamp: number;
|
|
8
|
+
/**
|
|
9
|
+
* The right-edge time the engine would use if it were following live —
|
|
10
|
+
* `now (+ windowBuffer)`. Equals {@link timestamp} while following; when
|
|
11
|
+
* scrolled back in time (see {@link EngineTickInput.viewEnd}) it keeps
|
|
12
|
+
* advancing while `timestamp` stays frozen. Exposed so the pan-scroll gesture
|
|
13
|
+
* can clamp against the live edge and detect catch-up.
|
|
14
|
+
*/
|
|
15
|
+
liveEdge: number;
|
|
16
|
+
/**
|
|
17
|
+
* Smoothed value at the visible window's right edge: the live value while
|
|
18
|
+
* following, or the price at `viewEnd` while scrolled back. Lets a badge track
|
|
19
|
+
* the last visible price as you pan (see `badge.followViewEdge`).
|
|
20
|
+
*/
|
|
21
|
+
edgeValue: number;
|
|
8
22
|
/**
|
|
9
23
|
* Value + time of the lowest / highest data point in the visible window —
|
|
10
24
|
* the actual extrema, NOT the smoothed display bounds (which carry margin and
|
|
@@ -43,6 +57,21 @@ export interface EngineTickInput {
|
|
|
43
57
|
windowBuffer?: number;
|
|
44
58
|
/** When true, freeze the viewport timestamp and skip displayWindow lerp */
|
|
45
59
|
paused?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Absolute right-edge time (unix seconds) to freeze the window at, or
|
|
62
|
+
* `null`/`undefined` to follow the live edge. Set by the pan-scroll gesture
|
|
63
|
+
* to scroll back in time; once it reaches (or passes) the live edge the engine
|
|
64
|
+
* resumes following. Takes precedence over {@link paused}.
|
|
65
|
+
*/
|
|
66
|
+
viewEnd?: number | null;
|
|
67
|
+
/**
|
|
68
|
+
* Absolute visible-window width (seconds) to freeze at, or `null`/`undefined`
|
|
69
|
+
* to follow the configured {@link timeWindow}. Set by the pinch-zoom gesture
|
|
70
|
+
* (see `usePinchZoom` / the `zoom` prop). The symmetric counterpart of
|
|
71
|
+
* {@link viewEnd}: `viewEnd` overrides the window's right edge, `viewWindow`
|
|
72
|
+
* overrides its width. `displayWindow` eases toward this when set.
|
|
73
|
+
*/
|
|
74
|
+
viewWindow?: number | null;
|
|
46
75
|
/** Chart mode — `"candle"` uses OHLC bars for Y range instead of line points. */
|
|
47
76
|
mode?: "line" | "candle";
|
|
48
77
|
/** Committed OHLC bars (sorted by time). Used when mode is `"candle"`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"liveChartEngineTick.d.ts","source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AC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2FAA2F;IAC3F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4FAA4F;IAC5F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,iFAAiF;IACjF,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IACzB,0EAA0E;IAC1E,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,uEAAuE;IACvE,UAAU,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;CACjC;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,iBAAiB,EACxB,KAAK,EAAE,eAAe,GACrB,IAAI,CAqNN"}
|
|
@@ -4,6 +4,12 @@ export interface MultiEngineTickMutable {
|
|
|
4
4
|
displayMax: number;
|
|
5
5
|
displayWindow: number;
|
|
6
6
|
timestamp: number;
|
|
7
|
+
/**
|
|
8
|
+
* The right-edge time the engine would use if following live (`now (+ buffer)`).
|
|
9
|
+
* Equals {@link timestamp} while following; keeps advancing while `timestamp`
|
|
10
|
+
* stays frozen when scrolled back (see {@link MultiEngineTickInput.viewEnd}).
|
|
11
|
+
*/
|
|
12
|
+
liveEdge: number;
|
|
7
13
|
displayValues: number[];
|
|
8
14
|
opacities: number[];
|
|
9
15
|
/**
|
|
@@ -40,6 +46,18 @@ export interface MultiEngineTickInput {
|
|
|
40
46
|
/** Right-edge buffer as a fraction of the time window. */
|
|
41
47
|
windowBuffer?: number;
|
|
42
48
|
paused?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Absolute right-edge time (unix seconds) to freeze the window at, or
|
|
51
|
+
* `null`/`undefined` to follow the live edge. Drives pan-scroll; takes
|
|
52
|
+
* precedence over {@link paused}.
|
|
53
|
+
*/
|
|
54
|
+
viewEnd?: number | null;
|
|
55
|
+
/**
|
|
56
|
+
* Absolute visible-window width (seconds) to freeze at, or `null`/`undefined`
|
|
57
|
+
* to follow {@link timeWindow}. Drives pinch-zoom (see `usePinchZoom`); the
|
|
58
|
+
* symmetric counterpart of {@link viewEnd}.
|
|
59
|
+
*/
|
|
60
|
+
viewWindow?: number | null;
|
|
43
61
|
}
|
|
44
62
|
/**
|
|
45
63
|
* Multi-series frame tick: lerps per-series tips and visibility opacities,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"liveChartSeriesEngineTick.d.ts","sourceRoot":"","sources":["../../src/core/liveChartSeriesEngineTick.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB;;;;;OAKG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,wFAAwF;IAC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