@wick-charts/vue 0.3.5 → 0.3.6
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/index.d.ts +37 -0
- package/dist/index.js +1183 -1126
- package/package.json +2 -2
- package/src/ChartContainer.vue +12 -3
- package/src/ui/Title.vue +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -183,6 +183,13 @@ declare type __VLS_Props_3 = {
|
|
|
183
183
|
* later changes are ignored.
|
|
184
184
|
*/
|
|
185
185
|
perf?: PerfOption;
|
|
186
|
+
/**
|
|
187
|
+
* Fired after the user releases a pan/zoom gesture that pulled the viewport
|
|
188
|
+
* past a data edge by more than ~10% of the visible range. Hosts typically
|
|
189
|
+
* respond by prefetching more history. Captured at mount only; changing
|
|
190
|
+
* the prop identity later is ignored.
|
|
191
|
+
*/
|
|
192
|
+
onEdgeReached?: (info: EdgeReachedInfo) => void;
|
|
186
193
|
};
|
|
187
194
|
|
|
188
195
|
declare type __VLS_Props_4 = {
|
|
@@ -939,6 +946,36 @@ export declare class ChartInstance extends EventEmitter<ChartEvents> {
|
|
|
939
946
|
setVisibleRange(range: VisibleRange | number): void;
|
|
940
947
|
getYRange(): YRange;
|
|
941
948
|
getCrosshairPosition(): CrosshairPosition | null;
|
|
949
|
+
/**
|
|
950
|
+
* Programmatically set or clear the crosshair. Same effect as the user
|
|
951
|
+
* hovering over `(timeToX(time), valueToY(y))` — emits `crosshairMove`,
|
|
952
|
+
* marks the overlay layer dirty, and lets `<Crosshair>` / `<Tooltip>`
|
|
953
|
+
* react via their normal store subscriptions.
|
|
954
|
+
*
|
|
955
|
+
* Pass `null` to clear (mirrors the pointer-leave path).
|
|
956
|
+
*
|
|
957
|
+
* `y` is optional. Resolution order when omitted:
|
|
958
|
+
* 1. **current crosshair's y** — preserves whatever the chart already
|
|
959
|
+
* has (real cursor y, or a previously-synthesised value). This is
|
|
960
|
+
* what makes the cross-chart broadcast pattern work: when an echo
|
|
961
|
+
* arrives at the chart that originated the hover, the existing y
|
|
962
|
+
* stays in place and the idempotency check below short-circuits the
|
|
963
|
+
* loop. Without preservation, the echo would overwrite the source's
|
|
964
|
+
* real cursor y with the midpoint default and the tooltip would
|
|
965
|
+
* jitter between cursor and midpoint every mouse-move.
|
|
966
|
+
* 2. **midpoint of the current Y range** — fallback when there is no
|
|
967
|
+
* current crosshair (first programmatic set on a chart that hasn't
|
|
968
|
+
* been hovered yet).
|
|
969
|
+
*
|
|
970
|
+
* Idempotent: a call that produces the same `(time, y)` pair as the
|
|
971
|
+
* current crosshair is a no-op (no emit). Combined with the y-preservation
|
|
972
|
+
* above, this lets N charts broadcast their hover to each other without
|
|
973
|
+
* a feedback-loop guard.
|
|
974
|
+
*/
|
|
975
|
+
setCrosshair(pos: {
|
|
976
|
+
time: number;
|
|
977
|
+
y?: number;
|
|
978
|
+
} | null): void;
|
|
942
979
|
/** Get the last visible value and whether the absolute last point is on screen. */
|
|
943
980
|
getLastValue(seriesId: string): {
|
|
944
981
|
value: number;
|