react-native-livechart 1.0.0 → 1.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/README.md +3 -2
- package/dist/components/CrosshairLine.d.ts +6 -1
- package/dist/components/CrosshairLine.d.ts.map +1 -1
- package/dist/components/CrosshairOverlay.d.ts +7 -1
- package/dist/components/CrosshairOverlay.d.ts.map +1 -1
- package/dist/components/DotOverlay.d.ts +12 -5
- 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/MultiSeriesDots.d.ts +8 -2
- package/dist/components/MultiSeriesDots.d.ts.map +1 -1
- package/dist/core/resolveConfig.d.ts +18 -2
- package/dist/core/resolveConfig.d.ts.map +1 -1
- package/dist/hooks/crosshairShared.d.ts +12 -4
- package/dist/hooks/crosshairShared.d.ts.map +1 -1
- package/dist/hooks/useCrosshair.d.ts +3 -1
- package/dist/hooks/useCrosshair.d.ts.map +1 -1
- package/dist/hooks/useCrosshairSeries.d.ts +3 -1
- package/dist/hooks/useCrosshairSeries.d.ts.map +1 -1
- package/dist/types.d.ts +39 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/CrosshairLine.tsx +7 -1
- package/src/components/CrosshairOverlay.tsx +8 -1
- package/src/components/DotOverlay.tsx +29 -14
- package/src/components/LiveChart.tsx +53 -15
- package/src/components/LiveChartSeries.tsx +66 -16
- package/src/components/MultiSeriesDots.tsx +30 -2
- package/src/core/resolveConfig.ts +57 -14
- package/src/hooks/crosshairShared.ts +24 -3
- package/src/hooks/useCrosshair.ts +15 -2
- package/src/hooks/useCrosshairSeries.ts +8 -2
- package/src/types.ts +41 -3
package/src/types.ts
CHANGED
|
@@ -203,6 +203,14 @@ export interface ScrubConfig {
|
|
|
203
203
|
tooltipColor?: string;
|
|
204
204
|
/** Tooltip pill border color. Omit to use theme `tooltipBorder`. */
|
|
205
205
|
tooltipBorderColor?: string;
|
|
206
|
+
/**
|
|
207
|
+
* Press-and-hold delay in milliseconds before scrubbing activates — think of
|
|
208
|
+
* it as "press and hold to scrub." During the delay the pan is not captured,
|
|
209
|
+
* so a quick horizontal swipe falls through to a parent gesture (e.g. a
|
|
210
|
+
* navigator's swipe-back-to-previous-route). `0` = scrub immediately on drag.
|
|
211
|
+
* Default `0`.
|
|
212
|
+
*/
|
|
213
|
+
panGestureDelay?: number;
|
|
206
214
|
}
|
|
207
215
|
|
|
208
216
|
/** Left-edge fade — soft erase so the chart blends into the left gutter (web liveline parity). */
|
|
@@ -392,10 +400,38 @@ export interface DegenShakePayload {
|
|
|
392
400
|
direction: "up" | "down";
|
|
393
401
|
}
|
|
394
402
|
|
|
395
|
-
/**
|
|
396
|
-
|
|
397
|
-
|
|
403
|
+
/** Contrasting outer ring drawn behind each series dot — the "haloed" look the
|
|
404
|
+
* single-series live dot has, so dots stand out against the lines and one
|
|
405
|
+
* another. */
|
|
406
|
+
export interface DotRingConfig {
|
|
407
|
+
/** Ring color. Default: theme `badgeOuterBg` (a near-background halo). */
|
|
408
|
+
color?: string;
|
|
409
|
+
/** Ring thickness in pixels — how far the halo extends past the dot. Default `2.5`. */
|
|
410
|
+
width?: number;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Shared live-dot styling, used by both `LiveChart` (`dot`) and
|
|
415
|
+
* `LiveChartSeries` (`dot`, which extends this). A dot is a color-filled circle
|
|
416
|
+
* of `radius` with an optional contrasting outer `ring` (halo).
|
|
417
|
+
*/
|
|
418
|
+
export interface DotConfig {
|
|
419
|
+
/** Radius of the (color-filled) dot in pixels. Default `3.5`. */
|
|
398
420
|
radius?: number;
|
|
421
|
+
/**
|
|
422
|
+
* Contrasting outer ring (halo) behind the dot, so it reads clearly against
|
|
423
|
+
* the line(s). `true` = defaults, `false` = a flat circle, or pass
|
|
424
|
+
* `DotRingConfig`. Default `true`.
|
|
425
|
+
*/
|
|
426
|
+
ring?: boolean | DotRingConfig;
|
|
427
|
+
/** Show the dot. `false` hides it (line, badge, and labels still render). Default `true`. */
|
|
428
|
+
show?: boolean;
|
|
429
|
+
/** Dot fill color. Defaults to the chart line color (per series for multi-series). */
|
|
430
|
+
color?: string;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/** Live dot configuration for multi-series charts (extends the shared {@link DotConfig}). */
|
|
434
|
+
export interface MultiSeriesDotConfig extends DotConfig {
|
|
399
435
|
/** Pulsing ring animation on each series dot. `true` = defaults, or pass `PulseConfig`. Default `true`. */
|
|
400
436
|
pulse?: boolean | PulseConfig;
|
|
401
437
|
/** Horizontal dashed line at each series' live value. `true` = defaults, or pass `ValueLineConfig`. Default `false`. */
|
|
@@ -629,6 +665,8 @@ export interface LiveChartProps extends LiveChartCoreProps {
|
|
|
629
665
|
momentum?: boolean | Momentum | MomentumConfig;
|
|
630
666
|
/** Pulsing ring animation on the live dot. `true` = defaults, or pass `PulseConfig`. Default `true`. */
|
|
631
667
|
pulse?: boolean | PulseConfig;
|
|
668
|
+
/** Live dot styling: `radius`, `ring` (halo), `show`, `color`. See {@link DotConfig}. */
|
|
669
|
+
dot?: DotConfig;
|
|
632
670
|
/** Horizontal dashed line at the current live value. `true` = defaults, or pass `ValueLineConfig`. */
|
|
633
671
|
valueLine?: boolean | ValueLineConfig;
|
|
634
672
|
/** Render the live value as a large text overlay in the top-left. Default `false`. */
|