velo-plot 1.11.1 → 1.12.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.
Files changed (54) hide show
  1. package/README.md +21 -2
  2. package/dist/axisFormat-B7o_uIEA.js +127 -0
  3. package/dist/axisFormat-B7o_uIEA.js.map +1 -0
  4. package/dist/core/OverlayRenderer.d.ts +1 -2
  5. package/dist/core/OverlayRenderer.test.d.ts +1 -0
  6. package/dist/core/chart/ChartCore.d.ts +17 -1
  7. package/dist/core/chart/ChartRenderLoop.d.ts +4 -0
  8. package/dist/core/chart/ChartScaling.d.ts +11 -0
  9. package/dist/core/chart/ChartScaling.test.d.ts +1 -0
  10. package/dist/core/chart/NavigationUtils.d.ts +12 -0
  11. package/dist/core/chart/NavigationUtils.test.d.ts +1 -0
  12. package/dist/core/chart/types.d.ts +11 -1
  13. package/dist/core/format/axisFormat.d.ts +16 -0
  14. package/dist/core/format/axisFormat.test.d.ts +1 -0
  15. package/dist/core/indicator/buildIndicatorPane.d.ts +22 -0
  16. package/dist/core/indicator/buildIndicatorSeries.d.ts +14 -0
  17. package/dist/core/indicator/buildIndicatorSeries.test.d.ts +1 -0
  18. package/dist/core/indicator/index.d.ts +3 -0
  19. package/dist/core/indicator/types.d.ts +74 -0
  20. package/dist/core/series/SeriesBounds.d.ts +1 -1
  21. package/dist/core/series/SeriesBounds.test.d.ts +1 -0
  22. package/dist/core/stacked/createStackedChart.d.ts +3 -0
  23. package/dist/core/stacked/createStackedChart.test.d.ts +1 -0
  24. package/dist/core/stacked/index.d.ts +4 -0
  25. package/dist/core/stacked/paneAxis.d.ts +20 -0
  26. package/dist/core/stacked/paneAxis.test.d.ts +1 -0
  27. package/dist/core/stacked/paneResize.d.ts +32 -0
  28. package/dist/core/stacked/paneResize.test.d.ts +1 -0
  29. package/dist/core/stacked/types.d.ts +91 -0
  30. package/dist/core/sync/index.d.ts +25 -70
  31. package/dist/core/sync/index.test.d.ts +1 -0
  32. package/dist/{index-D8ifudJH.js → index-DjeWClO9.js} +601 -561
  33. package/dist/index-DjeWClO9.js.map +1 -0
  34. package/dist/{index.core-CYu3tydL.js → index.core-xiNcuFfJ.js} +1760 -1405
  35. package/dist/index.core-xiNcuFfJ.js.map +1 -0
  36. package/dist/index.d.ts +2 -0
  37. package/dist/plugins/sync.js +169 -145
  38. package/dist/plugins/sync.js.map +1 -1
  39. package/dist/plugins/tools/tooltip/TooltipManager.d.ts +9 -1
  40. package/dist/plugins/tools/tooltip/format.d.ts +7 -0
  41. package/dist/plugins/tools/tooltip/format.test.d.ts +1 -0
  42. package/dist/plugins/tools/tooltip/types.d.ts +6 -8
  43. package/dist/plugins/tools.js +1 -1
  44. package/dist/react/index.d.ts +2 -1
  45. package/dist/react/useStackedPlot.d.ts +17 -0
  46. package/dist/types.d.ts +21 -1
  47. package/dist/velo-plot.full.js +2906 -2399
  48. package/dist/velo-plot.full.js.map +1 -1
  49. package/dist/velo-plot.js +11 -11
  50. package/package.json +9 -2
  51. package/dist/EventEmitter-DAbs2K1C.js +0 -60
  52. package/dist/EventEmitter-DAbs2K1C.js.map +0 -1
  53. package/dist/index-D8ifudJH.js.map +0 -1
  54. package/dist/index.core-CYu3tydL.js.map +0 -1
@@ -0,0 +1,17 @@
1
+ import { RefObject } from 'react';
2
+ import { StackedChart, StackedChartOptions } from '../core/stacked';
3
+ import { Range } from '../types';
4
+
5
+ export interface UseStackedPlotOptions extends Omit<StackedChartOptions, "container"> {
6
+ }
7
+ export interface UseStackedPlotReturn {
8
+ containerRef: RefObject<HTMLDivElement>;
9
+ stack: StackedChart | null;
10
+ isReady: boolean;
11
+ fitAll: (options?: {
12
+ x?: Range;
13
+ padding?: number;
14
+ }) => void;
15
+ resetAll: () => void;
16
+ }
17
+ export declare function useStackedPlot(options: UseStackedPlotOptions): UseStackedPlotReturn;
package/dist/types.d.ts CHANGED
@@ -23,6 +23,8 @@ export interface AxisOptions {
23
23
  position?: "left" | "right" | "top" | "bottom";
24
24
  /** Scale type */
25
25
  scale?: ScaleType;
26
+ /** Tick display type — affects label formatting, not the mathematical scale */
27
+ type?: "linear" | "time";
26
28
  /** Axis label (e.g., 'E / V') */
27
29
  label?: string;
28
30
  /** Unit for formatting (e.g., 'V', 'A') */
@@ -65,8 +67,10 @@ export interface AxisOptions {
65
67
  labelFontSize?: number;
66
68
  /** Label rotation in degrees (useful for crowded X-axis) */
67
69
  labelRotation?: number;
70
+ /** Target number of tick divisions on this axis (default: 8 for X, 6 for Y) */
71
+ tickCount?: number;
68
72
  }
69
- export type SeriesType = "line" | "scatter" | "line+scatter" | "step" | "step+scatter" | "band" | "area" | "bar" | "heatmap" | "candlestick" | "polar" | "radar" | "boxplot" | "waterfall" | "gauge" | "sankey" | "ternary";
73
+ export type SeriesType = "line" | "scatter" | "line+scatter" | "step" | "step+scatter" | "band" | "area" | "bar" | "heatmap" | "candlestick" | "polar" | "radar" | "boxplot" | "waterfall" | "gauge" | "sankey" | "ternary" | "indicator";
70
74
  /** Step mode defines where the step occurs */
71
75
  export type StepMode = "before" | "after" | "center";
72
76
  /** Error bar direction */
@@ -503,6 +507,8 @@ export interface TernaryOptions extends Omit<SeriesOptions, "data" | "style"> {
503
507
  export interface ChartOptions {
504
508
  /** Target container element */
505
509
  container: HTMLDivElement;
510
+ /** Stable chart id (used by sync groups; auto-generated if omitted) */
511
+ id?: string;
506
512
  /** Renderer backend selection (default: 'webgl') */
507
513
  renderer?: "webgl" | "webgpu";
508
514
  /** X-axis configuration */
@@ -589,6 +595,20 @@ export interface ZoomOptions {
589
595
  /** Animate the transition */
590
596
  animate?: boolean;
591
597
  }
598
+ /** Options for {@link Chart.fit} — safe fit that skips empty series */
599
+ export interface FitOptions {
600
+ /** Explicit X range (otherwise derived from visible series) */
601
+ x?: Range;
602
+ /** Explicit Y range for the primary Y axis (otherwise derived per axis) */
603
+ y?: Range;
604
+ /** Padding fraction applied to computed ranges (default: 0.02 for X, 0.05 for Y) */
605
+ padding?: number | {
606
+ x?: number;
607
+ y?: number;
608
+ };
609
+ /** Animate the transition */
610
+ animate?: boolean;
611
+ }
592
612
  export interface CursorOptions {
593
613
  /** Enable cursor */
594
614
  enabled?: boolean;