velo-plot 2.20.0 → 3.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 +26 -12
- package/dist/ChartCore-AnR_3Xkb.js +7338 -0
- package/dist/ChartCore-AnR_3Xkb.js.map +1 -0
- package/dist/GpuChartRenderer-Dxc0hrQA.js +75 -0
- package/dist/GpuChartRenderer-Dxc0hrQA.js.map +1 -0
- package/dist/{index.core-COREBDNq.js → PluginRegistry-CzMHebYP.js} +24 -38
- package/dist/PluginRegistry-CzMHebYP.js.map +1 -0
- package/dist/a11y-Bw6urYpr.js +105 -0
- package/dist/a11y-Bw6urYpr.js.map +1 -0
- package/dist/angular/hooks-entry.d.ts +1 -0
- package/dist/angular/hooks.d.ts +26 -0
- package/dist/angular/index.d.ts +8 -0
- package/dist/angular/velo-plot.component.d.ts +46 -0
- package/dist/angular-hooks.d.ts +1 -0
- package/dist/angular-hooks.js +9 -0
- package/dist/angular-hooks.js.map +1 -0
- package/dist/angular.d.ts +1 -0
- package/dist/angular.js +166 -0
- package/dist/angular.js.map +1 -0
- package/dist/assets/indicator.worker-bv0zC4EX.js.map +1 -1
- package/dist/astro/StackedPlot.astro +19 -0
- package/dist/astro/VeloPlot.astro +23 -0
- package/dist/{axisFormat-CzumxpCL.js → axisFormat-Sz4WIJfQ.js} +2 -2
- package/dist/{axisFormat-CzumxpCL.js.map → axisFormat-Sz4WIJfQ.js.map} +1 -1
- package/dist/bindings/shared/a11y.d.ts +26 -0
- package/dist/bindings/shared/chartLifecycle.d.ts +16 -0
- package/dist/bindings/shared/chartSyncBridge.d.ts +8 -0
- package/dist/bindings/shared/dimensions.d.ts +1 -0
- package/dist/bindings/shared/index.d.ts +9 -0
- package/dist/bindings/shared/indicatorBridge.d.ts +11 -0
- package/dist/bindings/shared/optionsSync.d.ts +7 -0
- package/dist/bindings/shared/seriesDiff.d.ts +8 -0
- package/dist/bindings/shared/stackedSync.d.ts +9 -0
- package/dist/bindings/shared/types.d.ts +46 -0
- package/dist/bindings/test-utils/index.d.ts +35 -0
- package/dist/bindings/test-utils/mockLifecycle.d.ts +120 -0
- package/dist/bindings/test-utils/vitestSveltePlugin.d.ts +3 -0
- package/dist/chartSyncBridge-D_rCtbFq.js +58 -0
- package/dist/chartSyncBridge-D_rCtbFq.js.map +1 -0
- package/dist/core/Chart.d.ts +1 -1
- package/dist/core/ChartStatistics.d.ts +1 -1
- package/dist/core/InteractionManager.d.ts +7 -1
- package/dist/core/OverlayRenderer.d.ts +5 -0
- package/dist/core/annotations/types.d.ts +1 -1
- package/dist/core/chart/ChartCore.d.ts +14 -19
- package/dist/core/chart/ChartFeatureHooks.d.ts +7 -0
- package/dist/core/chart/chartExportPatch.d.ts +2 -0
- package/dist/core/chart/overlaySeriesRegistry.d.ts +7 -0
- package/dist/core/chart/series/SeriesActions.d.ts +1 -0
- package/dist/core/chart/series/SeriesBufferLite.d.ts +13 -0
- package/dist/core/chart/series/seriesOptionsRegistry.d.ts +8 -0
- package/dist/core/chart/series/seriesTypeRegistry.d.ts +5 -0
- package/dist/core/chart/types.d.ts +1 -1
- package/dist/core/clipboard/index.d.ts +1 -1
- package/dist/core/debug/index.d.ts +1 -1
- package/dist/core/keybindings/index.d.ts +1 -1
- package/dist/core/loading/index.d.ts +1 -1
- package/dist/core/locale/index.d.ts +1 -1
- package/dist/core/stacked/paneResize.d.ts +3 -0
- package/dist/core/stacked/types.d.ts +10 -0
- package/dist/core/theme-editor/index.d.ts +1 -1
- package/dist/createStackedChart-DqcLCFGS.js +1338 -0
- package/dist/createStackedChart-DqcLCFGS.js.map +1 -0
- package/dist/examples/PluginDemonstration.d.ts +1 -1
- package/dist/hooks-DH-3bewj.js +69 -0
- package/dist/hooks-DH-3bewj.js.map +1 -0
- package/dist/{index-BBpJwOct.js → index-0InEyj0q.js} +119 -121
- package/dist/index-0InEyj0q.js.map +1 -0
- package/dist/{index-qunX30Xu.js → index-B7PTX94B.js} +2133 -2133
- package/dist/index-B7PTX94B.js.map +1 -0
- package/dist/{index-BMiZoKmm.js → index-BgrvqltV.js} +67 -67
- package/dist/index-BgrvqltV.js.map +1 -0
- package/dist/{index-DoYxf1cV.js → index-CWxIHdwX.js} +38 -98
- package/dist/index-CWxIHdwX.js.map +1 -0
- package/dist/index-CaXWSOTk.js.map +1 -1
- package/dist/{mockDatafeed-927foCM4.js → index-Cv6ZDLWf.js} +227 -217
- package/dist/index-Cv6ZDLWf.js.map +1 -0
- package/dist/index-Dag88bW4.js.map +1 -1
- package/dist/index-qhscKTDy.js.map +1 -1
- package/dist/index.core.d.ts +9 -7
- package/dist/index.d.ts +2 -15
- package/dist/indicators--eJGmVox.js.map +1 -1
- package/dist/optionsSync-QUiN4Inw.js +119 -0
- package/dist/optionsSync-QUiN4Inw.js.map +1 -0
- package/dist/plugins/3d/index.d.ts +2 -2
- package/dist/plugins/3d.d.ts +2 -2
- package/dist/plugins/3d.js +3 -1
- package/dist/plugins/3d.js.map +1 -1
- package/dist/plugins/analysis/index.d.ts +1 -1
- package/dist/plugins/analysis/indicators.d.ts +1 -1
- package/dist/plugins/analysis.d.ts +2 -2
- package/dist/plugins/analysis.js +2 -2
- package/dist/plugins/analysis.js.map +1 -1
- package/dist/plugins/annotations/index.d.ts +1 -1
- package/dist/plugins/annotations.d.ts +2 -2
- package/dist/plugins/annotations.js.map +1 -1
- package/dist/plugins/anomaly-detection.js +1 -1
- package/dist/plugins/anomaly-detection.js.map +1 -1
- package/dist/plugins/broken-axis.d.ts +2 -2
- package/dist/plugins/builtins/crosshair/CrosshairPlugin.d.ts +1 -1
- package/dist/plugins/builtins/index.d.ts +1 -1
- package/dist/plugins/caching.d.ts +2 -2
- package/dist/plugins/clipboard/index.d.ts +2 -2
- package/dist/plugins/clipboard.d.ts +2 -2
- package/dist/plugins/clipboard.js.map +1 -1
- package/dist/plugins/context-menu/index.d.ts +1 -1
- package/dist/plugins/context-menu.d.ts +2 -2
- package/dist/plugins/context-menu.js +1 -1
- package/dist/plugins/context-menu.js.map +1 -1
- package/dist/plugins/createPlugin.d.ts +8 -0
- package/dist/plugins/data-export/index.d.ts +1 -1
- package/dist/plugins/data-export.d.ts +2 -2
- package/dist/plugins/data-export.js +2 -2
- package/dist/plugins/data-export.js.map +1 -1
- package/dist/plugins/data-transform.d.ts +2 -2
- package/dist/plugins/data-transform.js +19 -19
- package/dist/plugins/data-transform.js.map +1 -1
- package/dist/plugins/debug/index.d.ts +2 -2
- package/dist/plugins/debug.d.ts +2 -2
- package/dist/plugins/debug.js +33 -33
- package/dist/plugins/debug.js.map +1 -1
- package/dist/plugins/forecasting/index.d.ts +1 -1
- package/dist/plugins/forecasting.js.map +1 -1
- package/dist/plugins/gpu/index.d.ts +2 -2
- package/dist/plugins/gpu.d.ts +2 -2
- package/dist/plugins/gpu.js +2033 -209
- package/dist/plugins/gpu.js.map +1 -1
- package/dist/plugins/i18n/index.d.ts +2 -2
- package/dist/plugins/i18n.d.ts +2 -2
- package/dist/plugins/i18n.js +286 -23
- package/dist/plugins/i18n.js.map +1 -1
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/keyboard.d.ts +2 -2
- package/dist/plugins/keyboard.js +65 -5
- package/dist/plugins/keyboard.js.map +1 -1
- package/dist/plugins/latex.js +766 -207
- package/dist/plugins/latex.js.map +1 -1
- package/dist/plugins/lazy-load.d.ts +2 -2
- package/dist/plugins/loading/index.d.ts +2 -3
- package/dist/plugins/loading.d.ts +2 -2
- package/dist/plugins/loading.js +3 -4
- package/dist/plugins/ml-integration.d.ts +2 -2
- package/dist/plugins/ml-integration.js +5 -5
- package/dist/plugins/ml-integration.js.map +1 -1
- package/dist/plugins/offscreen.d.ts +2 -2
- package/dist/plugins/offscreen.js +11 -10
- package/dist/plugins/offscreen.js.map +1 -1
- package/dist/plugins/pattern-recognition.d.ts +2 -2
- package/dist/plugins/pattern-recognition.js +1 -1
- package/dist/plugins/pattern-recognition.js.map +1 -1
- package/dist/plugins/radar.d.ts +2 -2
- package/dist/plugins/regression.d.ts +2 -2
- package/dist/plugins/regression.js +255 -257
- package/dist/plugins/regression.js.map +1 -1
- package/dist/plugins/roi.js +9 -9
- package/dist/plugins/roi.js.map +1 -1
- package/dist/plugins/snapshot/index.d.ts +1 -1
- package/dist/plugins/snapshot/types.d.ts +1 -1
- package/dist/plugins/snapshot.d.ts +2 -2
- package/dist/plugins/snapshot.js.map +1 -1
- package/dist/plugins/streaming/index.d.ts +2 -2
- package/dist/plugins/streaming.d.ts +2 -2
- package/dist/plugins/streaming.js +1 -1
- package/dist/plugins/sync/index.d.ts +3 -2
- package/dist/plugins/sync.d.ts +2 -2
- package/dist/plugins/sync.js.map +1 -1
- package/dist/plugins/theme-editor/index.d.ts +1 -1
- package/dist/plugins/theme-editor.d.ts +2 -2
- package/dist/plugins/tools/index.d.ts +1 -1
- package/dist/plugins/tools/tooltip/index.d.ts +1 -1
- package/dist/plugins/tools.d.ts +2 -2
- package/dist/plugins/tools.js +1 -1
- package/dist/plugins/types.d.ts +1 -1
- package/dist/plugins/video-recorder.d.ts +2 -2
- package/dist/plugins/virtualization.d.ts +2 -2
- package/dist/plugins/virtualization.js +1 -1
- package/dist/pool-DZ8shSqv.js +109 -0
- package/dist/pool-DZ8shSqv.js.map +1 -0
- package/dist/react/StackedPlot.d.ts +31 -0
- package/dist/react/VeloPlot.d.ts +29 -0
- package/dist/react/index.d.ts +25 -3
- package/dist/react/useChartSync.d.ts +8 -0
- package/dist/react/useIndicator.d.ts +12 -0
- package/dist/react/useVeloPlot.d.ts +19 -0
- package/dist/react.js +325 -24
- package/dist/react.js.map +1 -1
- package/dist/renderer/NativeWebGLRenderer.d.ts +2 -1
- package/dist/renderer/native/NativeWebGLRenderer.d.ts +5 -1
- package/dist/renderer/native/draw.d.ts +2 -47
- package/dist/renderer/native/drawCore.d.ts +27 -0
- package/dist/renderer/native/drawExtended.d.ts +29 -0
- package/dist/renderer/native/frameRenderExtended.d.ts +1 -0
- package/dist/renderer/native/frameRenderRegistry.d.ts +27 -0
- package/dist/renderer/native/programFactoryCore.d.ts +6 -0
- package/dist/renderer/native/programFactoryExtended.d.ts +4 -0
- package/dist/renderer/native/utils.d.ts +3 -29
- package/dist/renderer/native/utilsCore.d.ts +14 -0
- package/dist/renderer/native/utilsExtended.d.ts +17 -0
- package/dist/renderer/overlaySeriesExtended.d.ts +1 -0
- package/dist/renderer/registerExtendedSeries.d.ts +1 -0
- package/dist/renderer/registerWebGPU.d.ts +2 -0
- package/dist/renderer/seriesBufferExtended.d.ts +4 -0
- package/dist/scientific/index.d.ts +44 -0
- package/dist/scientific/registerScientific.d.ts +1 -0
- package/dist/scientific.d.ts +1 -0
- package/dist/scientific.js +91 -0
- package/dist/scientific.js.map +1 -0
- package/dist/solid/VeloPlot.d.ts +16 -0
- package/dist/solid/index.d.ts +13 -0
- package/dist/solid/useChartSync.d.ts +6 -0
- package/dist/solid/useIndicator.d.ts +11 -0
- package/dist/solid/useStackedPlot.d.ts +14 -0
- package/dist/solid/useVeloPlot.d.ts +18 -0
- package/dist/solid.d.ts +1 -0
- package/dist/solid.js +169 -0
- package/dist/solid.js.map +1 -0
- package/dist/stackedSync-tnrunZMt.js +100 -0
- package/dist/stackedSync-tnrunZMt.js.map +1 -0
- package/dist/svelte/StackedPlot.svelte +29 -0
- package/dist/svelte/StackedPlot.test.ts +114 -0
- package/dist/svelte/VeloPlot.svelte +44 -0
- package/dist/svelte/VeloPlot.test.ts +105 -0
- package/dist/svelte/index.d.ts +11 -0
- package/dist/svelte/index.test.ts +20 -0
- package/dist/svelte/index.ts +15 -0
- package/dist/svelte/useChartSync.d.ts +8 -0
- package/dist/svelte/useChartSync.test.ts +49 -0
- package/dist/svelte/useChartSync.ts +29 -0
- package/dist/svelte/useIndicator.d.ts +13 -0
- package/dist/svelte/useIndicator.test.ts +67 -0
- package/dist/svelte/useIndicator.ts +43 -0
- package/dist/svelte/useStackedPlot.d.ts +16 -0
- package/dist/svelte/useStackedPlot.test.ts +76 -0
- package/dist/svelte/useStackedPlot.ts +54 -0
- package/dist/svelte/useVeloPlot.d.ts +21 -0
- package/dist/svelte/useVeloPlot.test.ts +100 -0
- package/dist/svelte/useVeloPlot.ts +81 -0
- package/dist/svelte.d.ts +1 -0
- package/dist/svelte.js +140 -0
- package/dist/svelte.js.map +1 -0
- package/dist/testing/index.d.ts +1 -1
- package/dist/theme/index.d.ts +2 -1
- package/dist/trading/index.d.ts +1 -4
- package/dist/trading/registerTrading.d.ts +3 -0
- package/dist/trading.js +42 -42
- package/dist/types.d.ts +4 -4
- package/dist/{utils-BK5UUXxj.js → utils-Dx0h0bgQ.js} +9 -9
- package/dist/{utils-BK5UUXxj.js.map → utils-Dx0h0bgQ.js.map} +1 -1
- package/dist/velo-plot.full.js +2216 -1346
- package/dist/velo-plot.full.js.map +1 -1
- package/dist/velo-plot.js +33 -28
- package/dist/velo-plot.js.map +1 -1
- package/dist/vue/StackedPlot.vue.d.ts +48 -0
- package/dist/vue/VeloPlot.vue.d.ts +64 -0
- package/dist/vue/index.d.ts +250 -0
- package/dist/vue/useChartSync.d.ts +52 -0
- package/dist/vue/useIndicator.d.ts +23 -0
- package/dist/vue/useStackedPlot.d.ts +15 -0
- package/dist/vue/useVeloPlot.d.ts +20 -0
- package/dist/vue.d.ts +1 -0
- package/dist/vue.js +309 -0
- package/dist/vue.js.map +1 -0
- package/dist/workers/indicatorsAsync.d.ts +2 -0
- package/dist/workers/pool.d.ts +9 -0
- package/package.json +96 -10
- package/dist/ChartCore-ivzLqxVb.js +0 -8350
- package/dist/ChartCore-ivzLqxVb.js.map +0 -1
- package/dist/SciPlot-CEU4ApgD.js +0 -463
- package/dist/SciPlot-CEU4ApgD.js.map +0 -1
- package/dist/createStackedChart-DxNW0VkF.js +0 -705
- package/dist/createStackedChart-DxNW0VkF.js.map +0 -1
- package/dist/gpuRenderer-BpaMYz-k.js +0 -1848
- package/dist/gpuRenderer-BpaMYz-k.js.map +0 -1
- package/dist/index-BBpJwOct.js.map +0 -1
- package/dist/index-BMiZoKmm.js.map +0 -1
- package/dist/index-DoYxf1cV.js.map +0 -1
- package/dist/index-qunX30Xu.js.map +0 -1
- package/dist/index-x4stH3jD.js +0 -282
- package/dist/index-x4stH3jD.js.map +0 -1
- package/dist/index.core-COREBDNq.js.map +0 -1
- package/dist/mockDatafeed-927foCM4.js.map +0 -1
- package/dist/pool-15HMCNv8.js +0 -88
- package/dist/pool-15HMCNv8.js.map +0 -1
- package/dist/react/SciPlot.d.ts +0 -60
- package/dist/react/useSciPlot.d.ts +0 -56
- package/dist/symbols-DT0eLlpW.js +0 -568
- package/dist/symbols-DT0eLlpW.js.map +0 -1
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { vi } from 'vitest';
|
|
2
|
+
|
|
3
|
+
export declare function createMockChartLifecycle(): {
|
|
4
|
+
chart: import('../..').Chart & {
|
|
5
|
+
destroy: ReturnType<typeof vi.fn>;
|
|
6
|
+
addSeries: ReturnType<typeof vi.fn>;
|
|
7
|
+
updateSeries: ReturnType<typeof vi.fn>;
|
|
8
|
+
removeSeries: ReturnType<typeof vi.fn>;
|
|
9
|
+
on: ReturnType<typeof vi.fn>;
|
|
10
|
+
off: ReturnType<typeof vi.fn>;
|
|
11
|
+
zoom: ReturnType<typeof vi.fn>;
|
|
12
|
+
resetZoom: ReturnType<typeof vi.fn>;
|
|
13
|
+
autoScale: ReturnType<typeof vi.fn>;
|
|
14
|
+
enableCursor: ReturnType<typeof vi.fn>;
|
|
15
|
+
disableCursor: ReturnType<typeof vi.fn>;
|
|
16
|
+
setTheme: ReturnType<typeof vi.fn>;
|
|
17
|
+
updateXAxis: ReturnType<typeof vi.fn>;
|
|
18
|
+
updateYAxis: ReturnType<typeof vi.fn>;
|
|
19
|
+
resize: ReturnType<typeof vi.fn>;
|
|
20
|
+
getViewBounds: ReturnType<typeof vi.fn>;
|
|
21
|
+
getAllSeries: ReturnType<typeof vi.fn>;
|
|
22
|
+
};
|
|
23
|
+
destroy: import('vitest').Mock<(...args: any[]) => any>;
|
|
24
|
+
handle: {
|
|
25
|
+
chart: import('../..').Chart & {
|
|
26
|
+
destroy: ReturnType<typeof vi.fn>;
|
|
27
|
+
addSeries: ReturnType<typeof vi.fn>;
|
|
28
|
+
updateSeries: ReturnType<typeof vi.fn>;
|
|
29
|
+
removeSeries: ReturnType<typeof vi.fn>;
|
|
30
|
+
on: ReturnType<typeof vi.fn>;
|
|
31
|
+
off: ReturnType<typeof vi.fn>;
|
|
32
|
+
zoom: ReturnType<typeof vi.fn>;
|
|
33
|
+
resetZoom: ReturnType<typeof vi.fn>;
|
|
34
|
+
autoScale: ReturnType<typeof vi.fn>;
|
|
35
|
+
enableCursor: ReturnType<typeof vi.fn>;
|
|
36
|
+
disableCursor: ReturnType<typeof vi.fn>;
|
|
37
|
+
setTheme: ReturnType<typeof vi.fn>;
|
|
38
|
+
updateXAxis: ReturnType<typeof vi.fn>;
|
|
39
|
+
updateYAxis: ReturnType<typeof vi.fn>;
|
|
40
|
+
resize: ReturnType<typeof vi.fn>;
|
|
41
|
+
getViewBounds: ReturnType<typeof vi.fn>;
|
|
42
|
+
getAllSeries: ReturnType<typeof vi.fn>;
|
|
43
|
+
};
|
|
44
|
+
getBounds: () => import('../..').Bounds;
|
|
45
|
+
destroy: import('vitest').Mock<(...args: any[]) => any>;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export declare function mockChartLifecycleModule(): {
|
|
49
|
+
createChartLifecycle: import('vitest').Mock<() => {
|
|
50
|
+
chart: import('../..').Chart & {
|
|
51
|
+
destroy: ReturnType<typeof vi.fn>;
|
|
52
|
+
addSeries: ReturnType<typeof vi.fn>;
|
|
53
|
+
updateSeries: ReturnType<typeof vi.fn>;
|
|
54
|
+
removeSeries: ReturnType<typeof vi.fn>;
|
|
55
|
+
on: ReturnType<typeof vi.fn>;
|
|
56
|
+
off: ReturnType<typeof vi.fn>;
|
|
57
|
+
zoom: ReturnType<typeof vi.fn>;
|
|
58
|
+
resetZoom: ReturnType<typeof vi.fn>;
|
|
59
|
+
autoScale: ReturnType<typeof vi.fn>;
|
|
60
|
+
enableCursor: ReturnType<typeof vi.fn>;
|
|
61
|
+
disableCursor: ReturnType<typeof vi.fn>;
|
|
62
|
+
setTheme: ReturnType<typeof vi.fn>;
|
|
63
|
+
updateXAxis: ReturnType<typeof vi.fn>;
|
|
64
|
+
updateYAxis: ReturnType<typeof vi.fn>;
|
|
65
|
+
resize: ReturnType<typeof vi.fn>;
|
|
66
|
+
getViewBounds: ReturnType<typeof vi.fn>;
|
|
67
|
+
getAllSeries: ReturnType<typeof vi.fn>;
|
|
68
|
+
};
|
|
69
|
+
getBounds: () => import('../..').Bounds;
|
|
70
|
+
destroy: import('vitest').Mock<(...args: any[]) => any>;
|
|
71
|
+
}>;
|
|
72
|
+
pickSyncableOptions: (o: object) => object;
|
|
73
|
+
optionsChanged: () => boolean;
|
|
74
|
+
syncChartOptions: import('vitest').Mock<(...args: any[]) => any>;
|
|
75
|
+
lifecycle: {
|
|
76
|
+
chart: import('../..').Chart & {
|
|
77
|
+
destroy: ReturnType<typeof vi.fn>;
|
|
78
|
+
addSeries: ReturnType<typeof vi.fn>;
|
|
79
|
+
updateSeries: ReturnType<typeof vi.fn>;
|
|
80
|
+
removeSeries: ReturnType<typeof vi.fn>;
|
|
81
|
+
on: ReturnType<typeof vi.fn>;
|
|
82
|
+
off: ReturnType<typeof vi.fn>;
|
|
83
|
+
zoom: ReturnType<typeof vi.fn>;
|
|
84
|
+
resetZoom: ReturnType<typeof vi.fn>;
|
|
85
|
+
autoScale: ReturnType<typeof vi.fn>;
|
|
86
|
+
enableCursor: ReturnType<typeof vi.fn>;
|
|
87
|
+
disableCursor: ReturnType<typeof vi.fn>;
|
|
88
|
+
setTheme: ReturnType<typeof vi.fn>;
|
|
89
|
+
updateXAxis: ReturnType<typeof vi.fn>;
|
|
90
|
+
updateYAxis: ReturnType<typeof vi.fn>;
|
|
91
|
+
resize: ReturnType<typeof vi.fn>;
|
|
92
|
+
getViewBounds: ReturnType<typeof vi.fn>;
|
|
93
|
+
getAllSeries: ReturnType<typeof vi.fn>;
|
|
94
|
+
};
|
|
95
|
+
destroy: import('vitest').Mock<(...args: any[]) => any>;
|
|
96
|
+
handle: {
|
|
97
|
+
chart: import('../..').Chart & {
|
|
98
|
+
destroy: ReturnType<typeof vi.fn>;
|
|
99
|
+
addSeries: ReturnType<typeof vi.fn>;
|
|
100
|
+
updateSeries: ReturnType<typeof vi.fn>;
|
|
101
|
+
removeSeries: ReturnType<typeof vi.fn>;
|
|
102
|
+
on: ReturnType<typeof vi.fn>;
|
|
103
|
+
off: ReturnType<typeof vi.fn>;
|
|
104
|
+
zoom: ReturnType<typeof vi.fn>;
|
|
105
|
+
resetZoom: ReturnType<typeof vi.fn>;
|
|
106
|
+
autoScale: ReturnType<typeof vi.fn>;
|
|
107
|
+
enableCursor: ReturnType<typeof vi.fn>;
|
|
108
|
+
disableCursor: ReturnType<typeof vi.fn>;
|
|
109
|
+
setTheme: ReturnType<typeof vi.fn>;
|
|
110
|
+
updateXAxis: ReturnType<typeof vi.fn>;
|
|
111
|
+
updateYAxis: ReturnType<typeof vi.fn>;
|
|
112
|
+
resize: ReturnType<typeof vi.fn>;
|
|
113
|
+
getViewBounds: ReturnType<typeof vi.fn>;
|
|
114
|
+
getAllSeries: ReturnType<typeof vi.fn>;
|
|
115
|
+
};
|
|
116
|
+
getBounds: () => import('../..').Bounds;
|
|
117
|
+
destroy: import('vitest').Mock<(...args: any[]) => any>;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { c as s } from "./ChartCore-AnR_3Xkb.js";
|
|
2
|
+
import { a as d } from "./createStackedChart-DqcLCFGS.js";
|
|
3
|
+
import { c as u } from "./index-CaXWSOTk.js";
|
|
4
|
+
function c(e) {
|
|
5
|
+
const r = e.responsive ?? { reducedMotion: "auto" };
|
|
6
|
+
return { ...e, responsive: r };
|
|
7
|
+
}
|
|
8
|
+
function C(e, r, o = {}) {
|
|
9
|
+
const t = s({
|
|
10
|
+
...c(r),
|
|
11
|
+
container: e
|
|
12
|
+
}), i = () => {
|
|
13
|
+
var a;
|
|
14
|
+
(a = o.onBoundsChange) == null || a.call(o, t.getViewBounds());
|
|
15
|
+
};
|
|
16
|
+
t.on("zoom", i);
|
|
17
|
+
let n;
|
|
18
|
+
return r.autoResize !== !1 && (n = new ResizeObserver(() => {
|
|
19
|
+
t.resize();
|
|
20
|
+
}), n.observe(e)), {
|
|
21
|
+
chart: t,
|
|
22
|
+
getBounds: () => t.getViewBounds(),
|
|
23
|
+
destroy: () => {
|
|
24
|
+
n == null || n.disconnect(), t.off("zoom", i), t.destroy();
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function f(e) {
|
|
29
|
+
return e != null && "getPanes" in e && typeof e.getPanes == "function";
|
|
30
|
+
}
|
|
31
|
+
async function h(e, r, o = {}) {
|
|
32
|
+
if (!e)
|
|
33
|
+
throw new Error(
|
|
34
|
+
"[useIndicator] Chart is not ready. Wait for isReady before adding indicators."
|
|
35
|
+
);
|
|
36
|
+
return f(e) ? await e.addIndicator(r, o) : d(e, r, o);
|
|
37
|
+
}
|
|
38
|
+
function p(e, r) {
|
|
39
|
+
for (const o of [...e.getAllSeries()]) {
|
|
40
|
+
const t = o.getId();
|
|
41
|
+
(t === r || t.startsWith(`${r}-`)) && e.removeSeries(t);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function v(e, r) {
|
|
45
|
+
const o = u(e, r);
|
|
46
|
+
return {
|
|
47
|
+
group: o,
|
|
48
|
+
destroy: () => o.destroy()
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
h as a,
|
|
53
|
+
v as b,
|
|
54
|
+
C as c,
|
|
55
|
+
f as i,
|
|
56
|
+
p as r
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=chartSyncBridge-D_rCtbFq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chartSyncBridge-D_rCtbFq.js","sources":["../src/bindings/shared/chartLifecycle.ts","../src/bindings/shared/indicatorBridge.ts","../src/bindings/shared/chartSyncBridge.ts"],"sourcesContent":["/**\n * Framework-agnostic chart lifecycle helpers.\n */\n\nimport { createChart, type Chart } from \"../../core/Chart\";\nimport type { ChartOptions, Bounds } from \"../../types\";\nimport type { BindingChartOptions } from \"./types\";\n\nexport type ChartBindingOptions = Omit<ChartOptions, \"container\"> &\n BindingChartOptions;\n\nexport interface ChartLifecycleHandle {\n chart: Chart;\n destroy: () => void;\n getBounds: () => Bounds | null;\n}\n\nexport interface ChartLifecycleCallbacks {\n onBoundsChange?: (bounds: Bounds) => void;\n onError?: (error: Error) => void;\n}\n\nfunction defaultResponsive(\n options: ChartBindingOptions,\n): ChartBindingOptions {\n const responsive = options.responsive ?? { reducedMotion: \"auto\" as const };\n return { ...options, responsive };\n}\n\nexport function createChartLifecycle(\n container: HTMLDivElement,\n options: ChartBindingOptions,\n callbacks: ChartLifecycleCallbacks = {},\n): ChartLifecycleHandle {\n const chart = createChart({\n ...defaultResponsive(options),\n container,\n });\n\n const onZoom = () => {\n callbacks.onBoundsChange?.(chart.getViewBounds());\n };\n chart.on(\"zoom\", onZoom);\n\n let resizeObserver: ResizeObserver | undefined;\n if (options.autoResize !== false) {\n resizeObserver = new ResizeObserver(() => {\n chart.resize();\n });\n resizeObserver.observe(container);\n }\n\n return {\n chart,\n getBounds: () => chart.getViewBounds(),\n destroy: () => {\n resizeObserver?.disconnect();\n chart.off(\"zoom\", onZoom);\n chart.destroy();\n },\n };\n}\n\nexport function attachZoomListener(\n chart: Chart,\n onBoundsChange: (bounds: Bounds) => void,\n): () => void {\n const handler = () => onBoundsChange(chart.getViewBounds());\n chart.on(\"zoom\", handler);\n return () => chart.off(\"zoom\", handler);\n}\n","/**\n * Indicator bridge for framework bindings.\n */\n\nimport type { Chart } from \"../../core/chart/types\";\nimport type { StackedChart } from \"../../core/stacked/types\";\nimport {\n addIndicatorToChart,\n type AddIndicatorOptions,\n type AddIndicatorResult,\n} from \"../../core/indicator/addIndicator\";\nimport type { IndicatorPresetName } from \"../../core/indicator/indicatorPresets\";\n\nexport type IndicatorHost = Chart | StackedChart | null;\n\nexport function isStackedChart(host: IndicatorHost): host is StackedChart {\n return (\n host != null &&\n \"getPanes\" in host &&\n typeof (host as StackedChart).getPanes === \"function\"\n );\n}\n\nexport async function addIndicatorToHost(\n host: IndicatorHost,\n preset: IndicatorPresetName,\n options: AddIndicatorOptions = {},\n): Promise<AddIndicatorResult & { paneId?: string }> {\n if (!host) {\n throw new Error(\n \"[useIndicator] Chart is not ready. Wait for isReady before adding indicators.\",\n );\n }\n\n if (isStackedChart(host)) {\n const result = await host.addIndicator(preset, options);\n return result;\n }\n\n return addIndicatorToChart(host, preset, options);\n}\n\nexport function removeIndicatorFromChart(\n chart: Chart,\n rootId: string,\n): void {\n for (const s of [...chart.getAllSeries()]) {\n const sid = s.getId();\n if (sid === rootId || sid.startsWith(`${rootId}-`)) {\n chart.removeSeries(sid);\n }\n }\n}\n","/**\n * Chart sync bridge for framework bindings.\n */\n\nimport {\n ChartGroup,\n createChartGroup,\n type ChartLike,\n type SyncOptions,\n} from \"../../core/sync\";\n\nexport interface ChartSyncHandle {\n group: ChartGroup;\n destroy: () => void;\n}\n\nexport function createChartSync(\n charts: ChartLike[],\n options?: SyncOptions,\n): ChartSyncHandle {\n const group = createChartGroup(charts, options);\n return {\n group,\n destroy: () => group.destroy(),\n };\n}\n\nexport function updateChartSync(\n handle: ChartSyncHandle | null,\n charts: ChartLike[],\n options?: SyncOptions,\n): ChartSyncHandle {\n handle?.destroy();\n if (charts.length < 2) {\n return { group: new ChartGroup(options), destroy: () => {} };\n }\n return createChartSync(charts, options);\n}\n"],"names":["defaultResponsive","options","responsive","createChartLifecycle","container","callbacks","chart","createChart","onZoom","_a","resizeObserver","isStackedChart","host","addIndicatorToHost","preset","addIndicatorToChart","removeIndicatorFromChart","rootId","s","sid","createChartSync","charts","group","createChartGroup"],"mappings":";;;AAsBA,SAASA,EACPC,GACqB;AACrB,QAAMC,IAAaD,EAAQ,cAAc,EAAE,eAAe,OAAA;AAC1D,SAAO,EAAE,GAAGA,GAAS,YAAAC,EAAA;AACvB;AAEO,SAASC,EACdC,GACAH,GACAI,IAAqC,CAAA,GACf;AACtB,QAAMC,IAAQC,EAAY;AAAA,IACxB,GAAGP,EAAkBC,CAAO;AAAA,IAC5B,WAAAG;AAAA,EAAA,CACD,GAEKI,IAAS,MAAM;;AACnB,KAAAC,IAAAJ,EAAU,mBAAV,QAAAI,EAAA,KAAAJ,GAA2BC,EAAM;EACnC;AACA,EAAAA,EAAM,GAAG,QAAQE,CAAM;AAEvB,MAAIE;AACJ,SAAIT,EAAQ,eAAe,OACzBS,IAAiB,IAAI,eAAe,MAAM;AACxC,IAAAJ,EAAM,OAAA;AAAA,EACR,CAAC,GACDI,EAAe,QAAQN,CAAS,IAG3B;AAAA,IACL,OAAAE;AAAA,IACA,WAAW,MAAMA,EAAM,cAAA;AAAA,IACvB,SAAS,MAAM;AACb,MAAAI,KAAA,QAAAA,EAAgB,cAChBJ,EAAM,IAAI,QAAQE,CAAM,GACxBF,EAAM,QAAA;AAAA,IACR;AAAA,EAAA;AAEJ;AC9CO,SAASK,EAAeC,GAA2C;AACxE,SACEA,KAAQ,QACR,cAAcA,KACd,OAAQA,EAAsB,YAAa;AAE/C;AAEA,eAAsBC,EACpBD,GACAE,GACAb,IAA+B,CAAA,GACoB;AACnD,MAAI,CAACW;AACH,UAAM,IAAI;AAAA,MACR;AAAA,IAAA;AAIJ,SAAID,EAAeC,CAAI,IACN,MAAMA,EAAK,aAAaE,GAAQb,CAAO,IAIjDc,EAAoBH,GAAME,GAAQb,CAAO;AAClD;AAEO,SAASe,EACdV,GACAW,GACM;AACN,aAAWC,KAAK,CAAC,GAAGZ,EAAM,aAAA,CAAc,GAAG;AACzC,UAAMa,IAAMD,EAAE,MAAA;AACd,KAAIC,MAAQF,KAAUE,EAAI,WAAW,GAAGF,CAAM,GAAG,MAC/CX,EAAM,aAAaa,CAAG;AAAA,EAE1B;AACF;ACpCO,SAASC,EACdC,GACApB,GACiB;AACjB,QAAMqB,IAAQC,EAAiBF,GAAQpB,CAAO;AAC9C,SAAO;AAAA,IACL,OAAAqB;AAAA,IACA,SAAS,MAAMA,EAAM,QAAA;AAAA,EAAQ;AAEjC;"}
|
package/dist/core/Chart.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare class ChartStatistics {
|
|
|
11
11
|
constructor(parent: HTMLElement, theme: ChartTheme, series: Map<string, Series>);
|
|
12
12
|
private isDarkTheme;
|
|
13
13
|
private updateContainerStyle;
|
|
14
|
-
update(viewBounds: Bounds): void
|
|
14
|
+
update(viewBounds: Bounds): Promise<void>;
|
|
15
15
|
toggle(): void;
|
|
16
16
|
updateTheme(theme: ChartTheme): void;
|
|
17
17
|
destroy(): void;
|
|
@@ -29,6 +29,8 @@ export interface InteractionCallbacks {
|
|
|
29
29
|
onDragStart?: () => void;
|
|
30
30
|
/** Called when any drag operation ends */
|
|
31
31
|
onDragEnd?: () => void;
|
|
32
|
+
/** Called on double-tap (mobile reset zoom) */
|
|
33
|
+
onDoubleTap?: () => void;
|
|
32
34
|
/** Called for all raw interaction events for plugin processing */
|
|
33
35
|
onInteraction?: (event: import('../plugins/types').InteractionEvent) => void;
|
|
34
36
|
}
|
|
@@ -61,6 +63,10 @@ export declare class InteractionManager {
|
|
|
61
63
|
private lastMousePos;
|
|
62
64
|
private mouseDownPos;
|
|
63
65
|
private mode;
|
|
66
|
+
private pinchStartDistance;
|
|
67
|
+
private pinchStartBounds;
|
|
68
|
+
private lastTapTime;
|
|
69
|
+
private readonly doubleTapMs;
|
|
64
70
|
private boundWheel;
|
|
65
71
|
private boundMouseDown;
|
|
66
72
|
private boundMouseMove;
|
|
@@ -74,7 +80,7 @@ export declare class InteractionManager {
|
|
|
74
80
|
private detachListeners;
|
|
75
81
|
/**
|
|
76
82
|
* Set the interaction mode
|
|
77
|
-
* @deprecated Use setMode instead
|
|
83
|
+
* @deprecated Use setMode instead. **Removed in v4.0.**
|
|
78
84
|
*/
|
|
79
85
|
setPanMode(enabled: boolean): void;
|
|
80
86
|
/**
|
|
@@ -15,6 +15,11 @@ export declare class OverlayRenderer {
|
|
|
15
15
|
/** Filter X ticks to valid business-day indices (unique integers in range). */
|
|
16
16
|
private filterBusinessDayXTicks;
|
|
17
17
|
private resolveXTicks;
|
|
18
|
+
/**
|
|
19
|
+
* Grid X lines use the full viewport domain (nice even spacing), including
|
|
20
|
+
* regions past the loaded series. Axis labels stay filtered to real data.
|
|
21
|
+
*/
|
|
22
|
+
private resolveGridXTicks;
|
|
18
23
|
/**
|
|
19
24
|
* Set LaTeX API for rendering mathematical expressions
|
|
20
25
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Annotation Types
|
|
3
3
|
*
|
|
4
|
-
* Type definitions for all annotation types supported by
|
|
4
|
+
* Type definitions for all annotation types supported by Velo Plot.
|
|
5
5
|
*/
|
|
6
6
|
export type AnnotationType = 'horizontal-line' | 'vertical-line' | 'rectangle' | 'band' | 'text' | 'arrow';
|
|
7
7
|
export interface BaseAnnotation {
|
|
@@ -9,11 +9,11 @@ import { ResponsiveConfig, ResponsiveState } from '../responsive';
|
|
|
9
9
|
import { ChartState, SerializeOptions, DeserializeOptions } from '../../serialization';
|
|
10
10
|
import { Chart, ExportOptions } from './types';
|
|
11
11
|
import { ChartAnimationConfig } from '../animation';
|
|
12
|
-
import {
|
|
13
|
-
import { PriceAlertOptions } from './ChartAlerts';
|
|
14
|
-
import { PositionLineOptions } from './positionLines';
|
|
12
|
+
import { ChartFeatureHooks } from './ChartFeatureHooks';
|
|
15
13
|
|
|
16
14
|
export declare class ChartImpl implements Chart {
|
|
15
|
+
/** Optional hook for extended bundles (WebGPU, etc.). */
|
|
16
|
+
static afterConstruct: ((chart: ChartImpl, options: ChartOptions) => void) | null;
|
|
17
17
|
private container;
|
|
18
18
|
private webglCanvas;
|
|
19
19
|
private overlayCanvas;
|
|
@@ -35,7 +35,6 @@ export declare class ChartImpl implements Chart {
|
|
|
35
35
|
private plotAreaBackground;
|
|
36
36
|
private renderer;
|
|
37
37
|
private activeRendererType;
|
|
38
|
-
private rendererInitPromise;
|
|
39
38
|
private overlay;
|
|
40
39
|
private interaction;
|
|
41
40
|
private xScale;
|
|
@@ -103,9 +102,8 @@ export declare class ChartImpl implements Chart {
|
|
|
103
102
|
get animations(): ChartAnimationConfig;
|
|
104
103
|
private selectionManager;
|
|
105
104
|
private responsiveManager;
|
|
106
|
-
private
|
|
105
|
+
private featureHooks;
|
|
107
106
|
private timeScaleMapping;
|
|
108
|
-
private positionLineCounter;
|
|
109
107
|
constructor(options: ChartOptions);
|
|
110
108
|
/**
|
|
111
109
|
* Start the chart initialization (called by queue system)
|
|
@@ -142,6 +140,7 @@ export declare class ChartImpl implements Chart {
|
|
|
142
140
|
};
|
|
143
141
|
private getInteractedBounds;
|
|
144
142
|
exportImage(type?: "png" | "jpeg"): string;
|
|
143
|
+
setFeatureHooks(hooks: ChartFeatureHooks | null): void;
|
|
145
144
|
exportSVG(): string;
|
|
146
145
|
private getSeriesContext;
|
|
147
146
|
addSeries(options: SeriesOptions | HeatmapOptions): void;
|
|
@@ -156,17 +155,14 @@ export declare class ChartImpl implements Chart {
|
|
|
156
155
|
* Add a line of best fit to a series
|
|
157
156
|
*/
|
|
158
157
|
addFitLine(seriesId: string, type: any, options?: any): string;
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
addIndicator(preset: IndicatorPresetName, options?: AddIndicatorOptions): Promise<AddIndicatorResult>;
|
|
164
|
-
addAlert(options: PriceAlertOptions): string;
|
|
165
|
-
removeAlert(id: string): boolean;
|
|
158
|
+
private tradingRequired;
|
|
159
|
+
addIndicator(_preset: import('../indicator/addIndicator').IndicatorPresetName, _options?: import('../indicator/addIndicator').AddIndicatorOptions): Promise<import('../indicator/addIndicator').AddIndicatorResult>;
|
|
160
|
+
addAlert(_options: import('./ChartAlerts').PriceAlertOptions): string;
|
|
161
|
+
removeAlert(_id: string): boolean;
|
|
166
162
|
clearAlerts(): void;
|
|
167
|
-
getAlerts(): PriceAlertOptions[];
|
|
168
|
-
addPositionLine(
|
|
169
|
-
setDrawingMode(
|
|
163
|
+
getAlerts(): import('./ChartAlerts').PriceAlertOptions[];
|
|
164
|
+
addPositionLine(_options: import('./positionLines').PositionLineOptions): string;
|
|
165
|
+
setDrawingMode(_mode: import('../../plugins/drawing-tools').DrawingMode): void;
|
|
170
166
|
getSeries(id: string): Series | undefined;
|
|
171
167
|
getAllSeries(): Series[];
|
|
172
168
|
private getNavContext;
|
|
@@ -241,7 +237,6 @@ export declare class ChartImpl implements Chart {
|
|
|
241
237
|
getDPR(): number;
|
|
242
238
|
/** Runtime chart renderer backend in use. */
|
|
243
239
|
getActiveRenderer(): "webgl" | "webgpu";
|
|
244
|
-
private initGpuRenderer;
|
|
245
240
|
/**
|
|
246
241
|
* Set device pixel ratio and re-render
|
|
247
242
|
*/
|
|
@@ -308,7 +303,7 @@ export declare class ChartImpl implements Chart {
|
|
|
308
303
|
configureSelection(config: Partial<SelectionConfig>): void;
|
|
309
304
|
/**
|
|
310
305
|
* Set pan mode (true = pan, false = selection)
|
|
311
|
-
* @deprecated Use setMode('pan') or setMode('select') instead
|
|
306
|
+
* @deprecated Use setMode('pan') or setMode('select') instead. **Removed in v4.0.**
|
|
312
307
|
*/
|
|
313
308
|
setPanMode(enabled: boolean): void;
|
|
314
309
|
/**
|
|
@@ -365,7 +360,7 @@ export declare class ChartImpl implements Chart {
|
|
|
365
360
|
* Suspend canvas backing-store resize (inactive panes during stacked drag).
|
|
366
361
|
*/
|
|
367
362
|
setResizeSuspended(suspended: boolean): void;
|
|
368
|
-
/** @deprecated Use CSS transform on pane wrapper during drag; canvas stays untouched. */
|
|
363
|
+
/** @deprecated Use CSS transform on pane wrapper during drag; canvas stays untouched. **Removed in v4.0.** */
|
|
369
364
|
syncDragLayout(width?: number, height?: number): void;
|
|
370
365
|
isResizeSuspended(): boolean;
|
|
371
366
|
resize(): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Series } from '../Series';
|
|
2
|
+
import { PlotArea } from '../../types';
|
|
3
|
+
|
|
4
|
+
export type OverlaySeriesDrawer = (overlayCtx: CanvasRenderingContext2D, series: Series, plotArea: PlotArea) => void;
|
|
5
|
+
export declare function registerOverlaySeriesDrawer(type: string, drawer: OverlaySeriesDrawer): void;
|
|
6
|
+
export declare function getOverlaySeriesDrawer(type: string): OverlaySeriesDrawer | undefined;
|
|
7
|
+
export declare function drawRegisteredOverlaySeries(overlayCtx: CanvasRenderingContext2D, series: Iterable<Series>, plotArea: PlotArea): void;
|
|
@@ -2,6 +2,7 @@ import { SeriesOptions, HeatmapOptions, SeriesUpdateData } from '../../../types'
|
|
|
2
2
|
|
|
3
3
|
export declare function addSeries(ctx: any, options: SeriesOptions | HeatmapOptions): void;
|
|
4
4
|
export declare function removeSeries(ctx: any, id: string): void;
|
|
5
|
+
export declare function registerSeriesDataPreprocessor(fn: (ctx: unknown, data: SeriesUpdateData) => SeriesUpdateData): void;
|
|
5
6
|
export declare function updateSeries(ctx: any, id: string, data: SeriesUpdateData): void;
|
|
6
7
|
export declare function appendData(ctx: any, id: string, x: number[] | Float32Array, y: number[] | Float32Array): void;
|
|
7
8
|
export declare function setMaxPoints(ctx: any, id: string, maxPoints: number): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Series } from '../../Series';
|
|
2
|
+
|
|
3
|
+
export declare function updateSeriesBufferLite(ctx: {
|
|
4
|
+
renderer: {
|
|
5
|
+
createBuffer(id: string, data: Float32Array): void;
|
|
6
|
+
} | null;
|
|
7
|
+
}, s: Series): void;
|
|
8
|
+
export declare function refreshStackLite(ctx: {
|
|
9
|
+
renderer: {
|
|
10
|
+
createBuffer(id: string, data: Float32Array): void;
|
|
11
|
+
} | null;
|
|
12
|
+
series: Map<string, Series>;
|
|
13
|
+
}, stackId: string): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HeatmapOptions, SeriesOptions } from '../../../types';
|
|
2
|
+
|
|
3
|
+
export type SeriesOptionsPreprocessor = (ctx: unknown, options: SeriesOptions | HeatmapOptions) => SeriesOptions | HeatmapOptions;
|
|
4
|
+
export type SeriesOptionsExpander = (options: SeriesOptions | HeatmapOptions) => Array<SeriesOptions | HeatmapOptions>;
|
|
5
|
+
export declare function registerSeriesOptionsPreprocessor(fn: SeriesOptionsPreprocessor): void;
|
|
6
|
+
export declare function registerSeriesOptionsExpander(fn: SeriesOptionsExpander): void;
|
|
7
|
+
export declare function applySeriesOptionsPreprocessors(ctx: unknown, options: SeriesOptions | HeatmapOptions): SeriesOptions | HeatmapOptions;
|
|
8
|
+
export declare function expandSeriesOptions(options: SeriesOptions | HeatmapOptions): Array<SeriesOptions | HeatmapOptions>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Series } from '../../Series';
|
|
2
|
+
|
|
3
|
+
export type SeriesBufferHandler = (ctx: unknown, s: Series) => void;
|
|
4
|
+
export declare function registerSeriesBufferHandler(type: string, handler: SeriesBufferHandler): void;
|
|
5
|
+
export declare function getSeriesBufferHandler(type: string): SeriesBufferHandler | undefined;
|
|
@@ -144,7 +144,7 @@ export interface Chart {
|
|
|
144
144
|
configureSelection(config: any): void;
|
|
145
145
|
/**
|
|
146
146
|
* Set pan mode (true = pan, false = selection)
|
|
147
|
-
* @deprecated Use setMode('pan') or setMode('select') instead
|
|
147
|
+
* @deprecated Use setMode('pan') or setMode('select') instead. **Removed in v4.0.**
|
|
148
148
|
*/
|
|
149
149
|
setPanMode(enabled: boolean): void;
|
|
150
150
|
/**
|
|
@@ -14,6 +14,9 @@ export interface PaneResizeOptions {
|
|
|
14
14
|
onDragMove?: (sizesPx: number[], leadingIdx: number, trailingIdx: number) => void;
|
|
15
15
|
onDragEnd?: (finalSizesPx: number[]) => void;
|
|
16
16
|
}
|
|
17
|
+
export declare function injectDividerStyles(direction: StackDirection): void;
|
|
18
|
+
export declare function measurePaneSizes(paneWrappers: HTMLDivElement[], isHorizontal: boolean): number[];
|
|
19
|
+
export declare function resolveDragStartSizes(onDragStart: PaneResizeOptions["onDragStart"], leadingIdx: number, trailingIdx: number, paneWrappers: HTMLDivElement[], isHorizontal: boolean): number[];
|
|
17
20
|
export interface PaneResizeController {
|
|
18
21
|
dividers: HTMLDivElement[];
|
|
19
22
|
destroy: () => void;
|
|
@@ -37,6 +37,12 @@ export interface StackedChartOptions {
|
|
|
37
37
|
sharedXAxis?: "bottom" | "none";
|
|
38
38
|
/** Shared Y axis on left pane only (horizontal layout) */
|
|
39
39
|
sharedYAxis?: "left" | "none";
|
|
40
|
+
/**
|
|
41
|
+
* Shared X-axis defaults applied to every pane (e.g. `type: 'time'`, timeScale).
|
|
42
|
+
* Per-pane `chart.xAxis` overrides these. Visibility (labels/ticks/line) is still
|
|
43
|
+
* controlled by `sharedXAxis` / `showXAxis`.
|
|
44
|
+
*/
|
|
45
|
+
xAxis?: Omit<NonNullable<RootChartOptions["xAxis"]>, "showLabels" | "showTicks" | "showLine">;
|
|
40
46
|
/** Shared theme applied to every pane */
|
|
41
47
|
theme?: string | object;
|
|
42
48
|
devicePixelRatio?: number;
|
|
@@ -64,6 +70,10 @@ export interface StackedChartOptions {
|
|
|
64
70
|
export interface StackedChart {
|
|
65
71
|
readonly container: HTMLDivElement;
|
|
66
72
|
getPane(id: string): Chart | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* @deprecated Prefer `getPane(id)`. Alias kept for docs / Trading Experience. **Removed in v4.0.**
|
|
75
|
+
*/
|
|
76
|
+
getChart(id: string): Chart | undefined;
|
|
67
77
|
getPanes(): Chart[];
|
|
68
78
|
getMaster(): Chart;
|
|
69
79
|
getGroup(): ChartGroup;
|