velo-plot 1.11.1
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/LICENSE +21 -0
- package/README.md +119 -0
- package/dist/EventEmitter-DAbs2K1C.js +60 -0
- package/dist/EventEmitter-DAbs2K1C.js.map +1 -0
- package/dist/core/Chart.d.ts +15 -0
- package/dist/core/ChartControls.d.ts +41 -0
- package/dist/core/ChartInitQueue.d.ts +50 -0
- package/dist/core/ChartLegend.d.ts +74 -0
- package/dist/core/ChartStatistics.d.ts +18 -0
- package/dist/core/EventEmitter.d.ts +30 -0
- package/dist/core/InteractionManager.d.ts +96 -0
- package/dist/core/OverlayRenderer.d.ts +89 -0
- package/dist/core/Series.d.ts +4 -0
- package/dist/core/animation/AnimationEngine.d.ts +156 -0
- package/dist/core/animation/index.d.ts +6 -0
- package/dist/core/annotations/AnnotationManager.d.ts +61 -0
- package/dist/core/annotations/index.d.ts +5 -0
- package/dist/core/annotations/types.d.ts +159 -0
- package/dist/core/chart/ChartAnimatedNavigation.d.ts +53 -0
- package/dist/core/chart/ChartAxisManager.d.ts +61 -0
- package/dist/core/chart/ChartCore.d.ts +336 -0
- package/dist/core/chart/ChartExporter.d.ts +18 -0
- package/dist/core/chart/ChartNavigation.d.ts +33 -0
- package/dist/core/chart/ChartPluginBridge.d.ts +34 -0
- package/dist/core/chart/ChartRenderLoop.d.ts +100 -0
- package/dist/core/chart/ChartRenderer.d.ts +52 -0
- package/dist/core/chart/ChartScaling.d.ts +31 -0
- package/dist/core/chart/ChartSeries.d.ts +4 -0
- package/dist/core/chart/ChartSetup.d.ts +67 -0
- package/dist/core/chart/ChartStateManager.d.ts +54 -0
- package/dist/core/chart/ChartUI.d.ts +40 -0
- package/dist/core/chart/exporter/SVGExporter.d.ts +6 -0
- package/dist/core/chart/exporter/index.d.ts +5 -0
- package/dist/core/chart/index.d.ts +14 -0
- package/dist/core/chart/series/SeriesActions.d.ts +7 -0
- package/dist/core/chart/series/SeriesBuffer.d.ts +4 -0
- package/dist/core/chart/series/index.d.ts +6 -0
- package/dist/core/chart/series/types.d.ts +22 -0
- package/dist/core/chart/types.d.ts +188 -0
- package/dist/core/clipboard/index.d.ts +137 -0
- package/dist/core/debug/index.d.ts +143 -0
- package/dist/core/index.d.ts +17 -0
- package/dist/core/keybindings/index.d.ts +157 -0
- package/dist/core/layout/index.d.ts +12 -0
- package/dist/core/layout/types.d.ts +165 -0
- package/dist/core/loading/index.d.ts +104 -0
- package/dist/core/locale/index.d.ts +91 -0
- package/dist/core/responsive/ResponsiveManager.d.ts +133 -0
- package/dist/core/responsive/index.d.ts +4 -0
- package/dist/core/selection/SelectionManager.d.ts +165 -0
- package/dist/core/selection/index.d.ts +4 -0
- package/dist/core/series/Series.d.ts +73 -0
- package/dist/core/series/SeriesBounds.d.ts +3 -0
- package/dist/core/series/SeriesDataUtils.d.ts +7 -0
- package/dist/core/series/index.d.ts +6 -0
- package/dist/core/sync/index.d.ts +147 -0
- package/dist/core/theme-editor/index.d.ts +122 -0
- package/dist/examples/PluginDemonstration.d.ts +20 -0
- package/dist/examples.d.ts +25 -0
- package/dist/gpu/adapter/gpuRenderer.d.ts +135 -0
- package/dist/gpu/adapter/index.d.ts +7 -0
- package/dist/gpu/adapter/seriesAdapter.d.ts +88 -0
- package/dist/gpu/backends/webgl/WebGLBackend.d.ts +42 -0
- package/dist/gpu/backends/webgl/index.d.ts +5 -0
- package/dist/gpu/backends/webgl/programFactory.d.ts +30 -0
- package/dist/gpu/backends/webgl/shaders.d.ts +14 -0
- package/dist/gpu/backends/webgpu/MassiveDataRenderer.d.ts +111 -0
- package/dist/gpu/backends/webgpu/WebGPUBackend.d.ts +58 -0
- package/dist/gpu/backends/webgpu/pipelines/bandPipeline.d.ts +24 -0
- package/dist/gpu/backends/webgpu/pipelines/heatmapPipeline.d.ts +28 -0
- package/dist/gpu/backends/webgpu/pipelines/index.d.ts +10 -0
- package/dist/gpu/backends/webgpu/pipelines/instancedLinePipeline.d.ts +23 -0
- package/dist/gpu/backends/webgpu/pipelines/instancedPointPipeline.d.ts +25 -0
- package/dist/gpu/backends/webgpu/pipelines/linePipeline.d.ts +23 -0
- package/dist/gpu/backends/webgpu/pipelines/pointPipeline.d.ts +28 -0
- package/dist/gpu/backends/webgpu/pipelines/trianglePipeline.d.ts +5 -0
- package/dist/gpu/backends/webgpu/pipelines/triangleShader.d.ts +1 -0
- package/dist/gpu/backends/webgpu/shaders/heatmap.wgsl.d.ts +8 -0
- package/dist/gpu/backends/webgpu/shaders/index.d.ts +8 -0
- package/dist/gpu/backends/webgpu/shaders/instanced.wgsl.d.ts +16 -0
- package/dist/gpu/backends/webgpu/shaders/line.wgsl.d.ts +8 -0
- package/dist/gpu/backends/webgpu/shaders/point.wgsl.d.ts +9 -0
- package/dist/gpu/benchmark/benchmark.d.ts +74 -0
- package/dist/gpu/benchmark/index.d.ts +5 -0
- package/dist/gpu/compute/gpuCompute.d.ts +72 -0
- package/dist/gpu/compute/index.d.ts +6 -0
- package/dist/gpu/compute/shaders.d.ts +9 -0
- package/dist/gpu/drawList.d.ts +77 -0
- package/dist/gpu/examples/gallery.d.ts +20 -0
- package/dist/gpu/examples/index.d.ts +3 -0
- package/dist/gpu/examples/webgpu-line-demo.d.ts +8 -0
- package/dist/gpu/examples/webgpu-triangle.d.ts +1 -0
- package/dist/gpu/frame.d.ts +25 -0
- package/dist/gpu/index.d.ts +24 -0
- package/dist/gpu/resources/bufferStore.d.ts +40 -0
- package/dist/gpu/resources/index.d.ts +9 -0
- package/dist/gpu/resources/pipelineCache.d.ts +33 -0
- package/dist/gpu/resources/textureStore.d.ts +41 -0
- package/dist/gpu/types.d.ts +47 -0
- package/dist/index-BMiZoKmm.js +536 -0
- package/dist/index-BMiZoKmm.js.map +1 -0
- package/dist/index-Ce2JgkH_.js +282 -0
- package/dist/index-Ce2JgkH_.js.map +1 -0
- package/dist/index-D8ifudJH.js +2431 -0
- package/dist/index-D8ifudJH.js.map +1 -0
- package/dist/index-Dag88bW4.js +499 -0
- package/dist/index-Dag88bW4.js.map +1 -0
- package/dist/index-qhscKTDy.js +309 -0
- package/dist/index-qhscKTDy.js.map +1 -0
- package/dist/index-x4stH3jD.js +282 -0
- package/dist/index-x4stH3jD.js.map +1 -0
- package/dist/index.core-CYu3tydL.js +7252 -0
- package/dist/index.core-CYu3tydL.js.map +1 -0
- package/dist/index.core.d.ts +20 -0
- package/dist/index.d.ts +51 -0
- package/dist/overlay/CanvasOverlay.d.ts +102 -0
- package/dist/overlay/index.d.ts +4 -0
- package/dist/plugins/3d/Area3DRenderer.d.ts +122 -0
- package/dist/plugins/3d/Axes3D.d.ts +104 -0
- package/dist/plugins/3d/Bubble3DRenderer.d.ts +198 -0
- package/dist/plugins/3d/Impulse3DRenderer.d.ts +130 -0
- package/dist/plugins/3d/Line3DRenderer.d.ts +118 -0
- package/dist/plugins/3d/PointCloud3DRenderer.d.ts +84 -0
- package/dist/plugins/3d/Raycaster3D.d.ts +137 -0
- package/dist/plugins/3d/Ribbon3DRenderer.d.ts +83 -0
- package/dist/plugins/3d/SurfaceBar3DRenderer.d.ts +92 -0
- package/dist/plugins/3d/SurfaceMesh3DRenderer.d.ts +130 -0
- package/dist/plugins/3d/Tooltip3D.d.ts +71 -0
- package/dist/plugins/3d/VectorField3DRenderer.d.ts +86 -0
- package/dist/plugins/3d/Voxel3DRenderer.d.ts +89 -0
- package/dist/plugins/3d/Waterfall3DRenderer.d.ts +94 -0
- package/dist/plugins/3d/camera/OrbitCamera.d.ts +99 -0
- package/dist/plugins/3d/camera/index.d.ts +1 -0
- package/dist/plugins/3d/colorThemes.d.ts +39 -0
- package/dist/plugins/3d/controls/OrbitController.d.ts +69 -0
- package/dist/plugins/3d/controls/index.d.ts +1 -0
- package/dist/plugins/3d/index.d.ts +50 -0
- package/dist/plugins/3d/math/Mat4.d.ts +33 -0
- package/dist/plugins/3d/math/Vec3.d.ts +37 -0
- package/dist/plugins/3d/math/index.d.ts +4 -0
- package/dist/plugins/3d/mesh/InstancedMesh.d.ts +42 -0
- package/dist/plugins/3d/mesh/geometry.d.ts +34 -0
- package/dist/plugins/3d/mesh/index.d.ts +2 -0
- package/dist/plugins/3d/series/Area3D.d.ts +17 -0
- package/dist/plugins/3d/series/Column3D.d.ts +20 -0
- package/dist/plugins/3d/series/Heatmap3D.d.ts +17 -0
- package/dist/plugins/3d/series/Impulse3D.d.ts +16 -0
- package/dist/plugins/3d/series/PointLine3D.d.ts +20 -0
- package/dist/plugins/3d/series/Ribbon3D.d.ts +17 -0
- package/dist/plugins/3d/series/Scatter3D.d.ts +21 -0
- package/dist/plugins/3d/series/SurfaceMesh3D.d.ts +35 -0
- package/dist/plugins/3d/series/Waterfall3D.d.ts +38 -0
- package/dist/plugins/3d/series/index.d.ts +13 -0
- package/dist/plugins/3d/series/types.d.ts +143 -0
- package/dist/plugins/3d/shader/index.d.ts +2 -0
- package/dist/plugins/3d/shader/programs.d.ts +24 -0
- package/dist/plugins/3d/shader/sources.d.ts +27 -0
- package/dist/plugins/3d/types.d.ts +71 -0
- package/dist/plugins/3d.d.ts +3 -0
- package/dist/plugins/3d.js +5498 -0
- package/dist/plugins/3d.js.map +1 -0
- package/dist/plugins/PluginContext.d.ts +53 -0
- package/dist/plugins/PluginManager.d.ts +129 -0
- package/dist/plugins/PluginRegistry.d.ts +38 -0
- package/dist/plugins/analysis/SeriesFit.d.ts +3 -0
- package/dist/plugins/analysis/contours.d.ts +20 -0
- package/dist/plugins/analysis/fft.d.ts +138 -0
- package/dist/plugins/analysis/filters.d.ts +76 -0
- package/dist/plugins/analysis/fitting.d.ts +24 -0
- package/dist/plugins/analysis/index.d.ts +29 -0
- package/dist/plugins/analysis/indicators.d.ts +148 -0
- package/dist/plugins/analysis/math.d.ts +32 -0
- package/dist/plugins/analysis/statistics.d.ts +78 -0
- package/dist/plugins/analysis/utils.d.ts +150 -0
- package/dist/plugins/analysis.d.ts +3 -0
- package/dist/plugins/analysis.js +1202 -0
- package/dist/plugins/analysis.js.map +1 -0
- package/dist/plugins/annotations/index.d.ts +16 -0
- package/dist/plugins/annotations.d.ts +3 -0
- package/dist/plugins/annotations.js +438 -0
- package/dist/plugins/annotations.js.map +1 -0
- package/dist/plugins/anomaly-detection/algorithms.d.ts +38 -0
- package/dist/plugins/anomaly-detection/index.d.ts +16 -0
- package/dist/plugins/anomaly-detection/types.d.ts +57 -0
- package/dist/plugins/broken-axis/BrokenAxisScale.d.ts +24 -0
- package/dist/plugins/broken-axis/exports.d.ts +6 -0
- package/dist/plugins/broken-axis/index.d.ts +6 -0
- package/dist/plugins/broken-axis/types.d.ts +50 -0
- package/dist/plugins/builtins/crosshair/CrosshairPlugin.d.ts +40 -0
- package/dist/plugins/builtins/crosshair/index.d.ts +1 -0
- package/dist/plugins/builtins/data-logger/DataLoggerPlugin.d.ts +11 -0
- package/dist/plugins/builtins/data-logger/index.d.ts +1 -0
- package/dist/plugins/builtins/direction-indicator/DirectionIndicatorPlugin.d.ts +17 -0
- package/dist/plugins/builtins/direction-indicator/index.d.ts +2 -0
- package/dist/plugins/builtins/grid-highlight/GridHighlightPlugin.d.ts +17 -0
- package/dist/plugins/builtins/grid-highlight/index.d.ts +1 -0
- package/dist/plugins/builtins/index.d.ts +25 -0
- package/dist/plugins/builtins/stats/StatsPlugin.d.ts +11 -0
- package/dist/plugins/builtins/stats/index.d.ts +1 -0
- package/dist/plugins/builtins/watermark/WatermarkPlugin.d.ts +15 -0
- package/dist/plugins/builtins/watermark/index.d.ts +1 -0
- package/dist/plugins/caching/exports.d.ts +6 -0
- package/dist/plugins/caching/index.d.ts +6 -0
- package/dist/plugins/caching/types.d.ts +120 -0
- package/dist/plugins/clipboard/index.d.ts +20 -0
- package/dist/plugins/clipboard.d.ts +3 -0
- package/dist/plugins/clipboard.js +270 -0
- package/dist/plugins/clipboard.js.map +1 -0
- package/dist/plugins/context-menu/index.d.ts +12 -0
- package/dist/plugins/context-menu/renderer.d.ts +43 -0
- package/dist/plugins/context-menu/types.d.ts +202 -0
- package/dist/plugins/context-menu.d.ts +3 -0
- package/dist/plugins/context-menu.js +621 -0
- package/dist/plugins/context-menu.js.map +1 -0
- package/dist/plugins/data-export/formatters.d.ts +34 -0
- package/dist/plugins/data-export/index.d.ts +15 -0
- package/dist/plugins/data-export/types.d.ts +166 -0
- package/dist/plugins/data-export.d.ts +3 -0
- package/dist/plugins/data-export.js +463 -0
- package/dist/plugins/data-export.js.map +1 -0
- package/dist/plugins/data-transform/index.d.ts +6 -0
- package/dist/plugins/data-transform/types.d.ts +34 -0
- package/dist/plugins/debug/index.d.ts +24 -0
- package/dist/plugins/debug.d.ts +3 -0
- package/dist/plugins/debug.js +330 -0
- package/dist/plugins/debug.js.map +1 -0
- package/dist/plugins/drag-edit/exports.d.ts +6 -0
- package/dist/plugins/drag-edit/index.d.ts +6 -0
- package/dist/plugins/drag-edit/types.d.ts +118 -0
- package/dist/plugins/forecasting/algorithms.d.ts +6 -0
- package/dist/plugins/forecasting/exports.d.ts +3 -0
- package/dist/plugins/forecasting/index.d.ts +11 -0
- package/dist/plugins/forecasting/types.d.ts +88 -0
- package/dist/plugins/gpu/index.d.ts +24 -0
- package/dist/plugins/gpu.d.ts +3 -0
- package/dist/plugins/gpu.js +2430 -0
- package/dist/plugins/gpu.js.map +1 -0
- package/dist/plugins/i18n/index.d.ts +22 -0
- package/dist/plugins/i18n.d.ts +3 -0
- package/dist/plugins/i18n.js +37 -0
- package/dist/plugins/i18n.js.map +1 -0
- package/dist/plugins/index.d.ts +110 -0
- package/dist/plugins/keyboard/index.d.ts +15 -0
- package/dist/plugins/keyboard.d.ts +3 -0
- package/dist/plugins/keyboard.js +8 -0
- package/dist/plugins/keyboard.js.map +1 -0
- package/dist/plugins/latex/exports.d.ts +6 -0
- package/dist/plugins/latex/index.d.ts +8 -0
- package/dist/plugins/latex/parser.d.ts +6 -0
- package/dist/plugins/latex/renderer.d.ts +6 -0
- package/dist/plugins/latex/symbols.d.ts +28 -0
- package/dist/plugins/latex/types.d.ts +88 -0
- package/dist/plugins/lazy-load/exports.d.ts +6 -0
- package/dist/plugins/lazy-load/index.d.ts +6 -0
- package/dist/plugins/lazy-load/types.d.ts +121 -0
- package/dist/plugins/loading/index.d.ts +15 -0
- package/dist/plugins/loading.d.ts +3 -0
- package/dist/plugins/loading.js +7 -0
- package/dist/plugins/loading.js.map +1 -0
- package/dist/plugins/ml-integration/exports.d.ts +11 -0
- package/dist/plugins/ml-integration/index.d.ts +6 -0
- package/dist/plugins/ml-integration/native-algorithms.d.ts +69 -0
- package/dist/plugins/ml-integration/types.d.ts +74 -0
- package/dist/plugins/offscreen/exports.d.ts +6 -0
- package/dist/plugins/offscreen/index.d.ts +6 -0
- package/dist/plugins/offscreen/pool.d.ts +32 -0
- package/dist/plugins/offscreen/types.d.ts +35 -0
- package/dist/plugins/pattern-recognition/index.d.ts +6 -0
- package/dist/plugins/pattern-recognition/patterns.d.ts +3 -0
- package/dist/plugins/pattern-recognition/types.d.ts +245 -0
- package/dist/plugins/radar/index.d.ts +6 -0
- package/dist/plugins/radar/types.d.ts +40 -0
- package/dist/plugins/regression/algorithms.d.ts +6 -0
- package/dist/plugins/regression/index.d.ts +6 -0
- package/dist/plugins/regression/types.d.ts +261 -0
- package/dist/plugins/roi/exports.d.ts +6 -0
- package/dist/plugins/roi/index.d.ts +49 -0
- package/dist/plugins/roi/types.d.ts +60 -0
- package/dist/plugins/snapshot/index.d.ts +11 -0
- package/dist/plugins/snapshot/types.d.ts +38 -0
- package/dist/plugins/streaming/index.d.ts +32 -0
- package/dist/plugins/streaming.d.ts +3 -0
- package/dist/plugins/streaming.js +13 -0
- package/dist/plugins/streaming.js.map +1 -0
- package/dist/plugins/sync/index.d.ts +22 -0
- package/dist/plugins/sync.d.ts +3 -0
- package/dist/plugins/sync.js +261 -0
- package/dist/plugins/sync.js.map +1 -0
- package/dist/plugins/theme-editor/index.d.ts +18 -0
- package/dist/plugins/theme-editor.d.ts +3 -0
- package/dist/plugins/theme-editor.js +7 -0
- package/dist/plugins/theme-editor.js.map +1 -0
- package/dist/plugins/tools/delta-tool/index.d.ts +159 -0
- package/dist/plugins/tools/index.d.ts +21 -0
- package/dist/plugins/tools/peak-tool/index.d.ts +159 -0
- package/dist/plugins/tools/tooltip/TooltipManager.d.ts +213 -0
- package/dist/plugins/tools/tooltip/TooltipPositioner.d.ts +83 -0
- package/dist/plugins/tools/tooltip/TooltipRenderer.d.ts +64 -0
- package/dist/plugins/tools/tooltip/index.d.ts +18 -0
- package/dist/plugins/tools/tooltip/templates/AnnotationTemplate.d.ts +18 -0
- package/dist/plugins/tools/tooltip/templates/CrosshairTemplate.d.ts +39 -0
- package/dist/plugins/tools/tooltip/templates/DefaultTemplate.d.ts +30 -0
- package/dist/plugins/tools/tooltip/templates/HeatmapTemplate.d.ts +34 -0
- package/dist/plugins/tools/tooltip/templates/MinimalTemplate.d.ts +26 -0
- package/dist/plugins/tools/tooltip/templates/RangeTemplate.d.ts +18 -0
- package/dist/plugins/tools/tooltip/templates/ScientificTemplate.d.ts +34 -0
- package/dist/plugins/tools/tooltip/templates/index.d.ts +27 -0
- package/dist/plugins/tools/tooltip/themes.d.ts +48 -0
- package/dist/plugins/tools/tooltip/types.d.ts +396 -0
- package/dist/plugins/tools.d.ts +3 -0
- package/dist/plugins/tools.js +9 -0
- package/dist/plugins/tools.js.map +1 -0
- package/dist/plugins/types.d.ts +451 -0
- package/dist/plugins/video-recorder/exports.d.ts +6 -0
- package/dist/plugins/video-recorder/index.d.ts +6 -0
- package/dist/plugins/video-recorder/types.d.ts +55 -0
- package/dist/plugins/virtualization/exports.d.ts +6 -0
- package/dist/plugins/virtualization/index.d.ts +6 -0
- package/dist/plugins/virtualization/types.d.ts +48 -0
- package/dist/react/SciPlot.d.ts +60 -0
- package/dist/react/index.d.ts +5 -0
- package/dist/react/useSciPlot.d.ts +56 -0
- package/dist/renderer/BarRenderer.d.ts +14 -0
- package/dist/renderer/CandlestickRenderer.d.ts +12 -0
- package/dist/renderer/GaugeRenderer.d.ts +3 -0
- package/dist/renderer/HeatmapRenderer.d.ts +15 -0
- package/dist/renderer/NativeWebGLRenderer.d.ts +16 -0
- package/dist/renderer/PolarRenderer.d.ts +64 -0
- package/dist/renderer/RendererInterface.d.ts +70 -0
- package/dist/renderer/SankeyRenderer.d.ts +3 -0
- package/dist/renderer/WebGPURenderer.d.ts +16 -0
- package/dist/renderer/index.d.ts +13 -0
- package/dist/renderer/native/NativeWebGLRenderer.d.ts +31 -0
- package/dist/renderer/native/bufferStore.d.ts +11 -0
- package/dist/renderer/native/draw.d.ts +47 -0
- package/dist/renderer/native/programFactory.d.ts +3 -0
- package/dist/renderer/native/renderFrame.d.ts +3 -0
- package/dist/renderer/native/shaderSources.d.ts +6 -0
- package/dist/renderer/native/textureStore.d.ts +8 -0
- package/dist/renderer/native/types.d.ts +77 -0
- package/dist/renderer/native/utils.d.ts +31 -0
- package/dist/renderer/radar/RadarRenderer.d.ts +71 -0
- package/dist/renderer/radar/index.d.ts +10 -0
- package/dist/renderer/shaders.d.ts +77 -0
- package/dist/renderer/ternary/TernaryRenderer.d.ts +39 -0
- package/dist/renderer/ternary/index.d.ts +6 -0
- package/dist/renderer/ternary/types.d.ts +56 -0
- package/dist/scales/index.d.ts +54 -0
- package/dist/serialization/index.d.ts +153 -0
- package/dist/streaming/backpressure.d.ts +179 -0
- package/dist/streaming/index.d.ts +7 -0
- package/dist/streaming/mock.d.ts +12 -0
- package/dist/streaming/types.d.ts +57 -0
- package/dist/streaming/utils.d.ts +19 -0
- package/dist/streaming/websocket.d.ts +6 -0
- package/dist/testing/index.d.ts +225 -0
- package/dist/theme/colorSchemes.d.ts +56 -0
- package/dist/theme/index.d.ts +138 -0
- package/dist/types.d.ts +753 -0
- package/dist/utils-Dbro9-qM.js +254 -0
- package/dist/utils-Dbro9-qM.js.map +1 -0
- package/dist/velo-plot.d.ts +1 -0
- package/dist/velo-plot.full.d.ts +1 -0
- package/dist/velo-plot.full.js +5804 -0
- package/dist/velo-plot.full.js.map +1 -0
- package/dist/velo-plot.js +31 -0
- package/dist/velo-plot.js.map +1 -0
- package/dist/workers/downsample.d.ts +34 -0
- package/dist/workers/downsample.worker.d.ts +46 -0
- package/package.json +185 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 jigonzalez930209
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Sci Plot 🚀
|
|
2
|
+
|
|
3
|
+
A high-performance, WebGL-powered scientific charting engine built for precision, speed, and deep interactivity. Optimized for electrochemical and scientific data visualization.
|
|
4
|
+
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
[](https://www.npmjs.com/package/velo-plot)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## ✨ Features
|
|
10
|
+
|
|
11
|
+
- **🚀 High Performance**: Render millions of data points at 60 FPS using a specialized raw WebGL renderer.
|
|
12
|
+
- **📈 Advanced Analysis**: Built-in peak detection, integration, baseline correction, and customizable curve fitting (linear/poly/exp).
|
|
13
|
+
- **📊 Specialized Series**: Support for Lines, Scatter (SDF symbols), Step charts, Band series, Area charts, **Candlesticks** (OHLC), and **Stacked Charts**.
|
|
14
|
+
- **↕️ Multi-Axis Engine**: Independent scales and units with axis-specific scrolling and zooming.
|
|
15
|
+
- **📏 Professional Tooling**: Real-time Statistics panel, Annotations (Lines/Shapes/Text), and **high-fidelity SVG/PNG export**.
|
|
16
|
+
- **🎨 Color Schemes**: **5 professional palettes** with 20 colors each for multi-series charts, auto-assigned when colors aren't specified.
|
|
17
|
+
- **✨ Interactive Legend**: Hover over series in legend to **bring to front** and highlight with distinct color.
|
|
18
|
+
- **🔌 Extensible**: **Plugin System** with lifecycle hooks for custom drawing and data analysis.
|
|
19
|
+
- **⚛️ Framework First**: Native React support via hooks and high-level components.
|
|
20
|
+
- **🎨 Dynamic Theming**: Sleek built-in themes (Light/Midnight) with support for custom CSS-based skins.
|
|
21
|
+
- **🏗️ Modular Core**: Built on a modern, decoupled architecture for maximum extendability.
|
|
22
|
+
|
|
23
|
+
## 🛠️ Installation
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install velo-plot
|
|
27
|
+
# or
|
|
28
|
+
pnpm add velo-plot
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## 🚀 Quick Examples
|
|
32
|
+
|
|
33
|
+
### React (Recommended)
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
import { SciPlot } from 'velo-plot/react';
|
|
37
|
+
|
|
38
|
+
function App() {
|
|
39
|
+
const data = {
|
|
40
|
+
x: new Float32Array([0, 1, 2, 3]),
|
|
41
|
+
y: new Float32Array([10, 20, 15, 25])
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<div style={{ width: '800px', height: '400px' }}>
|
|
46
|
+
<SciPlot
|
|
47
|
+
series={[{ id: 's1', ...data, color: '#00f2ff' }]}
|
|
48
|
+
xAxis={{ label: 'Time (s)' }}
|
|
49
|
+
yAxis={{ label: 'Voltage (V)' }}
|
|
50
|
+
showControls
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Vanilla JavaScript
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
import { createChart } from 'velo-plot';
|
|
61
|
+
|
|
62
|
+
const chart = createChart({
|
|
63
|
+
container: document.getElementById('chart-container'),
|
|
64
|
+
theme: 'dark',
|
|
65
|
+
colorScheme: 'vibrant', // Auto-assigns colors from vibrant palette
|
|
66
|
+
showLegend: true
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
// Series without explicit colors get auto-assigned from the scheme
|
|
70
|
+
chart.addSeries({
|
|
71
|
+
id: 'signal1',
|
|
72
|
+
type: 'line',
|
|
73
|
+
data: { x: [...], y: [...] }
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
chart.addSeries({
|
|
77
|
+
id: 'signal2',
|
|
78
|
+
type: 'line',
|
|
79
|
+
data: { x: [...], y: [...] }
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
// Change color scheme at runtime
|
|
83
|
+
chart.setColorScheme('ocean');
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Multi-Series with Color Schemes
|
|
87
|
+
|
|
88
|
+
```typescript
|
|
89
|
+
// Create chart with 20+ series - colors auto-cycle
|
|
90
|
+
const chart = createChart({
|
|
91
|
+
container: document.getElementById('chart'),
|
|
92
|
+
colorScheme: 'neon', // 'vibrant', 'pastel', 'neon', 'earth', 'ocean'
|
|
93
|
+
showLegend: true
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
// Add multiple series - colors assigned automatically
|
|
97
|
+
for (let i = 0; i < 20; i++) {
|
|
98
|
+
chart.addSeries({
|
|
99
|
+
id: `series${i}`,
|
|
100
|
+
name: `Dataset ${i + 1}`,
|
|
101
|
+
type: 'line',
|
|
102
|
+
data: generateData(i)
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Hover over series in legend → brings to front + highlights! ✨
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## 📖 Documentation
|
|
110
|
+
|
|
111
|
+
Visit [Sci Plot Docs](https://jigonzalez930209.github.io/velo-plot/) for:
|
|
112
|
+
- [Getting Started Guide](https://jigonzalez930209.github.io/velo-plot/guide/)
|
|
113
|
+
- [Core Concepts](https://jigonzalez930209.github.io/velo-plot/guide/concepts)
|
|
114
|
+
- [API Reference](https://jigonzalez930209.github.io/velo-plot/api/chart)
|
|
115
|
+
- [Interactive Examples](https://jigonzalez930209.github.io/velo-plot/examples/)
|
|
116
|
+
|
|
117
|
+
## 📄 License
|
|
118
|
+
|
|
119
|
+
MIT © [jigonzalez930209](https://github.com/jigonzalez930209)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
var o = Object.defineProperty;
|
|
2
|
+
var h = (r, e, s) => e in r ? o(r, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : r[e] = s;
|
|
3
|
+
var n = (r, e, s) => h(r, typeof e != "symbol" ? e + "" : e, s);
|
|
4
|
+
class c {
|
|
5
|
+
constructor() {
|
|
6
|
+
n(this, "listeners", /* @__PURE__ */ new Map());
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Subscribe to an event
|
|
10
|
+
*/
|
|
11
|
+
on(e, s) {
|
|
12
|
+
this.listeners.has(e) || this.listeners.set(e, /* @__PURE__ */ new Set()), this.listeners.get(e).add(s);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Unsubscribe from an event
|
|
16
|
+
*/
|
|
17
|
+
off(e, s) {
|
|
18
|
+
const t = this.listeners.get(e);
|
|
19
|
+
t && t.delete(s);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Emit an event with data
|
|
23
|
+
*/
|
|
24
|
+
emit(e, s) {
|
|
25
|
+
const t = this.listeners.get(e);
|
|
26
|
+
t && t.forEach((i) => {
|
|
27
|
+
try {
|
|
28
|
+
i(s);
|
|
29
|
+
} catch (l) {
|
|
30
|
+
console.error(`[EventEmitter] Error in handler for "${String(e)}":`, l);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Subscribe to an event once
|
|
36
|
+
*/
|
|
37
|
+
once(e, s) {
|
|
38
|
+
const t = (i) => {
|
|
39
|
+
this.off(e, t), s(i);
|
|
40
|
+
};
|
|
41
|
+
this.on(e, t);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Remove all listeners
|
|
45
|
+
*/
|
|
46
|
+
clear() {
|
|
47
|
+
this.listeners.clear();
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Get listener count for an event
|
|
51
|
+
*/
|
|
52
|
+
listenerCount(e) {
|
|
53
|
+
var s;
|
|
54
|
+
return ((s = this.listeners.get(e)) == null ? void 0 : s.size) ?? 0;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
c as E
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=EventEmitter-DAbs2K1C.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventEmitter-DAbs2K1C.js","sources":["../src/core/EventEmitter.ts"],"sourcesContent":["/**\n * Type-safe event emitter for chart events\n */\n\nexport class EventEmitter<EventMap extends object> {\n private listeners: Map<keyof EventMap, Set<(data: unknown) => void>> =\n new Map();\n\n /**\n * Subscribe to an event\n */\n on<K extends keyof EventMap>(\n event: K,\n handler: (data: EventMap[K]) => void\n ): void {\n if (!this.listeners.has(event)) {\n this.listeners.set(event, new Set());\n }\n this.listeners.get(event)!.add(handler as (data: unknown) => void);\n }\n\n /**\n * Unsubscribe from an event\n */\n off<K extends keyof EventMap>(\n event: K,\n handler: (data: EventMap[K]) => void\n ): void {\n const handlers = this.listeners.get(event);\n if (handlers) {\n handlers.delete(handler as (data: unknown) => void);\n }\n }\n\n /**\n * Emit an event with data\n */\n emit<K extends keyof EventMap>(event: K, data: EventMap[K]): void {\n const handlers = this.listeners.get(event);\n if (handlers) {\n handlers.forEach((handler) => {\n try {\n handler(data);\n } catch (error) {\n console.error(`[EventEmitter] Error in handler for \"${String(event)}\":`, error);\n }\n });\n }\n }\n\n /**\n * Subscribe to an event once\n */\n once<K extends keyof EventMap>(\n event: K,\n handler: (data: EventMap[K]) => void\n ): void {\n const wrappedHandler = (data: EventMap[K]) => {\n this.off(event, wrappedHandler);\n handler(data);\n };\n this.on(event, wrappedHandler);\n }\n\n /**\n * Remove all listeners\n */\n clear(): void {\n this.listeners.clear();\n }\n\n /**\n * Get listener count for an event\n */\n listenerCount(event: keyof EventMap): number {\n return this.listeners.get(event)?.size ?? 0;\n }\n}\n"],"names":["EventEmitter","__publicField","event","handler","handlers","data","error","wrappedHandler","_a"],"mappings":";;;AAIO,MAAMA,EAAsC;AAAA,EAA5C;AACG,IAAAC,EAAA,uCACF,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKN,GACEC,GACAC,GACM;AACN,IAAK,KAAK,UAAU,IAAID,CAAK,KAC3B,KAAK,UAAU,IAAIA,GAAO,oBAAI,KAAK,GAErC,KAAK,UAAU,IAAIA,CAAK,EAAG,IAAIC,CAAkC;AAAA,EACnE;AAAA;AAAA;AAAA;AAAA,EAKA,IACED,GACAC,GACM;AACN,UAAMC,IAAW,KAAK,UAAU,IAAIF,CAAK;AACzC,IAAIE,KACFA,EAAS,OAAOD,CAAkC;AAAA,EAEtD;AAAA;AAAA;AAAA;AAAA,EAKA,KAA+BD,GAAUG,GAAyB;AAChE,UAAMD,IAAW,KAAK,UAAU,IAAIF,CAAK;AACzC,IAAIE,KACFA,EAAS,QAAQ,CAACD,MAAY;AAC5B,UAAI;AACF,QAAAA,EAAQE,CAAI;AAAA,MACd,SAASC,GAAO;AACd,gBAAQ,MAAM,wCAAwC,OAAOJ,CAAK,CAAC,MAAMI,CAAK;AAAA,MAChF;AAAA,IACF,CAAC;AAAA,EAEL;AAAA;AAAA;AAAA;AAAA,EAKA,KACEJ,GACAC,GACM;AACN,UAAMI,IAAiB,CAACF,MAAsB;AAC5C,WAAK,IAAIH,GAAOK,CAAc,GAC9BJ,EAAQE,CAAI;AAAA,IACd;AACA,SAAK,GAAGH,GAAOK,CAAc;AAAA,EAC/B;AAAA;AAAA;AAAA;AAAA,EAKA,QAAc;AACZ,SAAK,UAAU,MAAA;AAAA,EACjB;AAAA;AAAA;AAAA;AAAA,EAKA,cAAcL,GAA+B;AAtExC,QAAAM;AAuEH,aAAOA,IAAA,KAAK,UAAU,IAAIN,CAAK,MAAxB,gBAAAM,EAA2B,SAAQ;AAAA,EAC5C;AACF;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chart - Main Sci Plot Entry Point
|
|
3
|
+
*
|
|
4
|
+
* This file re-exports the chart API from the modular implementation.
|
|
5
|
+
* For the core implementation, see ./chart/ChartCore.ts
|
|
6
|
+
*/
|
|
7
|
+
export type { Chart, ExportOptions } from './chart/types';
|
|
8
|
+
export { MARGINS } from './chart/types';
|
|
9
|
+
export { createChart, ChartImpl } from './chart/ChartCore';
|
|
10
|
+
export { exportToCSV, exportToJSON, exportToImage } from './chart/ChartExporter';
|
|
11
|
+
export { applyZoom, applyPan } from './chart/ChartNavigation';
|
|
12
|
+
export { autoScaleAll, handleBoxZoom } from './chart/ChartScaling';
|
|
13
|
+
export type { NavigationContext } from './chart/ChartNavigation';
|
|
14
|
+
export type { RenderContext } from './chart/ChartRenderer';
|
|
15
|
+
export type { ChartOptions } from '../types';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ChartTheme } from '../theme';
|
|
2
|
+
import { InteractionMode } from './InteractionManager';
|
|
3
|
+
import { ToolbarOptions } from '../types';
|
|
4
|
+
|
|
5
|
+
export interface ChartControlsCallbacks {
|
|
6
|
+
onResetZoom: () => void;
|
|
7
|
+
onSetType: (type: "line" | "scatter" | "line+scatter") => void;
|
|
8
|
+
onToggleSmoothing: () => void;
|
|
9
|
+
onTogglePan: (active: boolean) => void;
|
|
10
|
+
onSetMode: (mode: InteractionMode) => void;
|
|
11
|
+
onExport: () => void;
|
|
12
|
+
onAutoScale: () => void;
|
|
13
|
+
onToggleLegend: (visible: boolean) => void;
|
|
14
|
+
onHoverStart: () => void;
|
|
15
|
+
onHoverEnd: () => void;
|
|
16
|
+
}
|
|
17
|
+
export declare class ChartControls {
|
|
18
|
+
private container;
|
|
19
|
+
private toolbar;
|
|
20
|
+
private buttonsWrapper;
|
|
21
|
+
private callbacks;
|
|
22
|
+
private theme;
|
|
23
|
+
private options;
|
|
24
|
+
private isSmoothing;
|
|
25
|
+
private currentMode;
|
|
26
|
+
private isLegendVisible;
|
|
27
|
+
private currentType;
|
|
28
|
+
private isPinned;
|
|
29
|
+
private isExpanded;
|
|
30
|
+
constructor(parent: HTMLElement, theme: ChartTheme, callbacks: ChartControlsCallbacks, options?: ToolbarOptions);
|
|
31
|
+
private isDarkTheme;
|
|
32
|
+
private updateToolbarStyle;
|
|
33
|
+
private updateVisibility;
|
|
34
|
+
private createButtons;
|
|
35
|
+
private createPinButton;
|
|
36
|
+
private enforceSVGVisibility;
|
|
37
|
+
private createButton;
|
|
38
|
+
private updateButtonStates;
|
|
39
|
+
updateTheme(theme: ChartTheme): void;
|
|
40
|
+
destroy(): void;
|
|
41
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chart Initialization Queue
|
|
3
|
+
*
|
|
4
|
+
* Internal system that manages sequential initialization of multiple charts.
|
|
5
|
+
* This is automatically integrated into createChart - no external usage needed.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Internal: Wait for turn in initialization queue
|
|
9
|
+
* Returns the assigned chart ID
|
|
10
|
+
*/
|
|
11
|
+
export declare function waitForInitTurn(): Promise<string>;
|
|
12
|
+
/**
|
|
13
|
+
* Internal: Mark chart initialization as complete
|
|
14
|
+
*/
|
|
15
|
+
export declare function markInitComplete(id: string): void;
|
|
16
|
+
/**
|
|
17
|
+
* Get queue status (for debugging)
|
|
18
|
+
*/
|
|
19
|
+
export declare function getInitQueueStatus(): {
|
|
20
|
+
pending: number;
|
|
21
|
+
completed: number;
|
|
22
|
+
currentId: string | null;
|
|
23
|
+
isProcessing: boolean;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Reset the queue (call on page navigation if needed)
|
|
27
|
+
*/
|
|
28
|
+
export declare function resetInitQueue(): void;
|
|
29
|
+
export declare class ChartInitQueue {
|
|
30
|
+
private static instance;
|
|
31
|
+
static getStatus(): {
|
|
32
|
+
pending: number;
|
|
33
|
+
completed: number;
|
|
34
|
+
currentId: string | null;
|
|
35
|
+
isProcessing: boolean;
|
|
36
|
+
};
|
|
37
|
+
static reset(): void;
|
|
38
|
+
}
|
|
39
|
+
export declare function getChartInitQueue(): {
|
|
40
|
+
getStatus: () => {
|
|
41
|
+
pending: number;
|
|
42
|
+
completed: number;
|
|
43
|
+
currentId: string | null;
|
|
44
|
+
isProcessing: boolean;
|
|
45
|
+
};
|
|
46
|
+
reset: () => void;
|
|
47
|
+
};
|
|
48
|
+
export declare function queueChartInit(_id: string, fn: () => Promise<void>): Promise<void>;
|
|
49
|
+
export declare function waitForAnimations(durationMs?: number): Promise<void>;
|
|
50
|
+
export declare function resetChartQueue(): void;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { ChartTheme } from '../theme';
|
|
2
|
+
import { Series } from './Series';
|
|
3
|
+
|
|
4
|
+
export interface ChartLegendCallbacks {
|
|
5
|
+
onMove: (x: number, y: number) => void;
|
|
6
|
+
onResize?: (width: number) => void;
|
|
7
|
+
onInteractionStart?: () => void;
|
|
8
|
+
onInteractionEnd?: () => void;
|
|
9
|
+
onHoverStart?: () => void;
|
|
10
|
+
onHoverEnd?: () => void;
|
|
11
|
+
/**
|
|
12
|
+
* Called when mouse enters a series item in legend
|
|
13
|
+
* @param series - The series being hovered
|
|
14
|
+
* @param highlightColor - Whether to apply color highlighting (from options)
|
|
15
|
+
*/
|
|
16
|
+
onSeriesHoverStart?: (series: Series, highlightColor: boolean) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Called when mouse leaves a series item in legend
|
|
19
|
+
* @param series - The series that was hovered
|
|
20
|
+
* @param highlightColor - Whether color highlighting was applied
|
|
21
|
+
*/
|
|
22
|
+
onSeriesHoverEnd?: (series: Series, highlightColor: boolean) => void;
|
|
23
|
+
onToggleVisibility?: (series: Series) => void;
|
|
24
|
+
}
|
|
25
|
+
/** Options for ChartLegend component */
|
|
26
|
+
export interface ChartLegendOptions {
|
|
27
|
+
x?: number;
|
|
28
|
+
y?: number;
|
|
29
|
+
width?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Highlight series color on hover (default: false)
|
|
32
|
+
* When false, series still comes to foreground but color doesn't change
|
|
33
|
+
*/
|
|
34
|
+
highlightOnHover?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Bring series to foreground (z-index) on hover (default: true)
|
|
37
|
+
*/
|
|
38
|
+
bringToFrontOnHover?: boolean;
|
|
39
|
+
/** Allow dragging the legend (default: true) */
|
|
40
|
+
draggable?: boolean;
|
|
41
|
+
/** Allow resizing the legend (default: true) */
|
|
42
|
+
resizable?: boolean;
|
|
43
|
+
}
|
|
44
|
+
export declare class ChartLegend {
|
|
45
|
+
private container;
|
|
46
|
+
private visualContainer;
|
|
47
|
+
private header;
|
|
48
|
+
private content;
|
|
49
|
+
private theme;
|
|
50
|
+
private series;
|
|
51
|
+
private callbacks;
|
|
52
|
+
private swatchCanvases;
|
|
53
|
+
private options;
|
|
54
|
+
private isDragging;
|
|
55
|
+
private isResizing;
|
|
56
|
+
private dragOffsetX;
|
|
57
|
+
private dragOffsetY;
|
|
58
|
+
constructor(parent: HTMLElement, theme: ChartTheme, options: ChartLegendOptions, callbacks: ChartLegendCallbacks);
|
|
59
|
+
private updateStyle;
|
|
60
|
+
private initDragging;
|
|
61
|
+
update(series: Series[]): void;
|
|
62
|
+
private render;
|
|
63
|
+
updateSeriesStyle(s: Series): void;
|
|
64
|
+
private paintSwatch;
|
|
65
|
+
/**
|
|
66
|
+
* Internal symbol drawing logic (shared with canvas export)
|
|
67
|
+
*/
|
|
68
|
+
private drawSymbol;
|
|
69
|
+
draw(ctx: CanvasRenderingContext2D, dpr: number): void;
|
|
70
|
+
updateTheme(theme: ChartTheme): void;
|
|
71
|
+
setWidth(width: number): void;
|
|
72
|
+
setVisible(visible: boolean): void;
|
|
73
|
+
destroy(): void;
|
|
74
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ChartTheme } from '../theme';
|
|
2
|
+
import { Series } from './Series';
|
|
3
|
+
import { Bounds } from '../types';
|
|
4
|
+
|
|
5
|
+
export declare class ChartStatistics {
|
|
6
|
+
private container;
|
|
7
|
+
private content;
|
|
8
|
+
private theme;
|
|
9
|
+
private series;
|
|
10
|
+
private isExpanded;
|
|
11
|
+
constructor(parent: HTMLElement, theme: ChartTheme, series: Map<string, Series>);
|
|
12
|
+
private isDarkTheme;
|
|
13
|
+
private updateContainerStyle;
|
|
14
|
+
update(viewBounds: Bounds): void;
|
|
15
|
+
toggle(): void;
|
|
16
|
+
updateTheme(theme: ChartTheme): void;
|
|
17
|
+
destroy(): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type-safe event emitter for chart events
|
|
3
|
+
*/
|
|
4
|
+
export declare class EventEmitter<EventMap extends object> {
|
|
5
|
+
private listeners;
|
|
6
|
+
/**
|
|
7
|
+
* Subscribe to an event
|
|
8
|
+
*/
|
|
9
|
+
on<K extends keyof EventMap>(event: K, handler: (data: EventMap[K]) => void): void;
|
|
10
|
+
/**
|
|
11
|
+
* Unsubscribe from an event
|
|
12
|
+
*/
|
|
13
|
+
off<K extends keyof EventMap>(event: K, handler: (data: EventMap[K]) => void): void;
|
|
14
|
+
/**
|
|
15
|
+
* Emit an event with data
|
|
16
|
+
*/
|
|
17
|
+
emit<K extends keyof EventMap>(event: K, data: EventMap[K]): void;
|
|
18
|
+
/**
|
|
19
|
+
* Subscribe to an event once
|
|
20
|
+
*/
|
|
21
|
+
once<K extends keyof EventMap>(event: K, handler: (data: EventMap[K]) => void): void;
|
|
22
|
+
/**
|
|
23
|
+
* Remove all listeners
|
|
24
|
+
*/
|
|
25
|
+
clear(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Get listener count for an event
|
|
28
|
+
*/
|
|
29
|
+
listenerCount(event: keyof EventMap): number;
|
|
30
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { Bounds } from '../types';
|
|
2
|
+
|
|
3
|
+
export interface AxisLayout {
|
|
4
|
+
id: string;
|
|
5
|
+
position: "left" | "right";
|
|
6
|
+
offset: number;
|
|
7
|
+
}
|
|
8
|
+
export interface InteractionCallbacks {
|
|
9
|
+
onZoom: (bounds: Bounds, axisId?: string) => void;
|
|
10
|
+
onPan: (deltaX: number, deltaY: number, axisId?: string) => void;
|
|
11
|
+
onBoxZoom: (rect: {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
} | null) => void;
|
|
17
|
+
onCursorMove: (x: number, y: number) => void;
|
|
18
|
+
onCursorLeave: () => void;
|
|
19
|
+
onPointClick?: (pixelX: number, pixelY: number, ctrlKey: boolean, shiftKey: boolean) => void;
|
|
20
|
+
onBoxSelect?: (rect: {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
} | null, additive: boolean) => void;
|
|
26
|
+
onBoxSelectUpdate?: (pixelX: number, pixelY: number) => void;
|
|
27
|
+
onBoxSelectStart?: (pixelX: number, pixelY: number) => void;
|
|
28
|
+
/** Called when any drag operation starts (pan, box zoom, box select) */
|
|
29
|
+
onDragStart?: () => void;
|
|
30
|
+
/** Called when any drag operation ends */
|
|
31
|
+
onDragEnd?: () => void;
|
|
32
|
+
/** Called for all raw interaction events for plugin processing */
|
|
33
|
+
onInteraction?: (event: import('../plugins/types').InteractionEvent) => void;
|
|
34
|
+
}
|
|
35
|
+
export interface PlotAreaGetter {
|
|
36
|
+
(): {
|
|
37
|
+
x: number;
|
|
38
|
+
y: number;
|
|
39
|
+
width: number;
|
|
40
|
+
height: number;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export interface BoundsGetter {
|
|
44
|
+
(axisId?: string): Bounds;
|
|
45
|
+
}
|
|
46
|
+
export interface AxisLayoutGetter {
|
|
47
|
+
(): AxisLayout[];
|
|
48
|
+
}
|
|
49
|
+
export type InteractionMode = 'pan' | 'boxZoom' | 'select' | 'delta' | 'peak';
|
|
50
|
+
export declare class InteractionManager {
|
|
51
|
+
private container;
|
|
52
|
+
private callbacks;
|
|
53
|
+
private getPlotArea;
|
|
54
|
+
private getBounds;
|
|
55
|
+
private getAxesLayout;
|
|
56
|
+
private isDragging;
|
|
57
|
+
private panningAxisId?;
|
|
58
|
+
private isBoxSelecting;
|
|
59
|
+
private isBoxZooming;
|
|
60
|
+
private selectionStart;
|
|
61
|
+
private lastMousePos;
|
|
62
|
+
private mode;
|
|
63
|
+
private boundWheel;
|
|
64
|
+
private boundMouseDown;
|
|
65
|
+
private boundMouseMove;
|
|
66
|
+
private boundMouseUp;
|
|
67
|
+
private boundMouseLeave;
|
|
68
|
+
private boundTouchStart;
|
|
69
|
+
private boundTouchMove;
|
|
70
|
+
private boundTouchEnd;
|
|
71
|
+
constructor(container: HTMLElement, callbacks: InteractionCallbacks, getPlotArea: PlotAreaGetter, getBounds: BoundsGetter, getAxesLayout: AxisLayoutGetter);
|
|
72
|
+
private attachListeners;
|
|
73
|
+
private detachListeners;
|
|
74
|
+
/**
|
|
75
|
+
* Set the interaction mode
|
|
76
|
+
* @deprecated Use setMode instead
|
|
77
|
+
*/
|
|
78
|
+
setPanMode(enabled: boolean): void;
|
|
79
|
+
/**
|
|
80
|
+
* Set the interaction mode: 'pan', 'boxZoom', or 'select'
|
|
81
|
+
*/
|
|
82
|
+
setMode(mode: InteractionMode): void;
|
|
83
|
+
/**
|
|
84
|
+
* Get the current interaction mode
|
|
85
|
+
*/
|
|
86
|
+
getMode(): InteractionMode;
|
|
87
|
+
private handleWheel;
|
|
88
|
+
private handleMouseDown;
|
|
89
|
+
private handleMouseMove;
|
|
90
|
+
private handleMouseUp;
|
|
91
|
+
private handleMouseLeave;
|
|
92
|
+
private handleTouchStart;
|
|
93
|
+
private handleTouchMove;
|
|
94
|
+
private handleTouchEnd;
|
|
95
|
+
destroy(): void;
|
|
96
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Scale } from '../scales';
|
|
2
|
+
import { ChartTheme } from '../theme';
|
|
3
|
+
import { Series } from './Series';
|
|
4
|
+
import { PlotArea, CursorState, AxisOptions } from '../types';
|
|
5
|
+
import { ChartTitleOptions, AxisLayoutOptions } from './layout/types';
|
|
6
|
+
|
|
7
|
+
export declare class OverlayRenderer {
|
|
8
|
+
private ctx;
|
|
9
|
+
private theme;
|
|
10
|
+
private latexAPI;
|
|
11
|
+
constructor(ctx: CanvasRenderingContext2D, theme: ChartTheme);
|
|
12
|
+
/**
|
|
13
|
+
* Set LaTeX API for rendering mathematical expressions
|
|
14
|
+
*/
|
|
15
|
+
setLatexAPI(api: any): void;
|
|
16
|
+
/**
|
|
17
|
+
* Helper to draw text or LaTeX
|
|
18
|
+
*/
|
|
19
|
+
private drawLatexOrText;
|
|
20
|
+
/**
|
|
21
|
+
* Update the theme
|
|
22
|
+
*/
|
|
23
|
+
setTheme(theme: ChartTheme): void;
|
|
24
|
+
/**
|
|
25
|
+
* Clear the overlay
|
|
26
|
+
*/
|
|
27
|
+
clear(): void;
|
|
28
|
+
/**
|
|
29
|
+
* Draw the grid
|
|
30
|
+
*/
|
|
31
|
+
drawGrid(plotArea: PlotArea, xScale: Scale, yScale: Scale): void;
|
|
32
|
+
/**
|
|
33
|
+
* Draw polar grid (radial circles and angular spokes)
|
|
34
|
+
*/
|
|
35
|
+
drawPolarGrid(plotArea: PlotArea, xScale: Scale, yScale: Scale, radialDivisions?: number, angularDivisions?: number, angleMode?: 'degrees' | 'radians'): void;
|
|
36
|
+
/**
|
|
37
|
+
* Draw X axis with ticks and labels
|
|
38
|
+
*/
|
|
39
|
+
drawXAxis(plotArea: PlotArea, xScale: Scale, options?: AxisOptions, layout?: AxisLayoutOptions): void;
|
|
40
|
+
/**
|
|
41
|
+
* Draw Y axis with ticks and labels
|
|
42
|
+
*/
|
|
43
|
+
drawYAxis(plotArea: PlotArea, yScale: Scale, options?: AxisOptions, position?: "left" | "right", offset?: number, layout?: AxisLayoutOptions): void;
|
|
44
|
+
/**
|
|
45
|
+
* Draw plot area border
|
|
46
|
+
*/
|
|
47
|
+
drawPlotBorder(plotArea: PlotArea): void;
|
|
48
|
+
/**
|
|
49
|
+
* Draw chart title
|
|
50
|
+
*/
|
|
51
|
+
drawChartTitle(plotArea: PlotArea, options: ChartTitleOptions): void;
|
|
52
|
+
/**
|
|
53
|
+
* Draw legend
|
|
54
|
+
*/
|
|
55
|
+
drawLegend(plotArea: PlotArea, series: Series[]): void;
|
|
56
|
+
/**
|
|
57
|
+
* Helper to draw a symbol in the legend
|
|
58
|
+
*/
|
|
59
|
+
private drawLegendSymbol;
|
|
60
|
+
/**
|
|
61
|
+
* Draw cursor/crosshair
|
|
62
|
+
*/
|
|
63
|
+
drawCursor(plotArea: PlotArea, cursor: CursorState, lineStyle?: 'solid' | 'dashed' | 'dotted'): void;
|
|
64
|
+
/**
|
|
65
|
+
* Draw tooltip
|
|
66
|
+
*/
|
|
67
|
+
private drawTooltip;
|
|
68
|
+
/**
|
|
69
|
+
* Draw tooltip in a fixed corner position
|
|
70
|
+
*/
|
|
71
|
+
private drawCornerTooltip;
|
|
72
|
+
/**
|
|
73
|
+
* Draw selection rectangle (Box Zoom)
|
|
74
|
+
*/
|
|
75
|
+
drawSelectionRect(rect: {
|
|
76
|
+
x: number;
|
|
77
|
+
y: number;
|
|
78
|
+
width: number;
|
|
79
|
+
height: number;
|
|
80
|
+
}): void;
|
|
81
|
+
/**
|
|
82
|
+
* Draw error bars for a series
|
|
83
|
+
*/
|
|
84
|
+
drawErrorBars(plotArea: PlotArea, series: Series, xScale: Scale, yScale: Scale): void;
|
|
85
|
+
private generateMinorTicks;
|
|
86
|
+
private formatXTick;
|
|
87
|
+
private formatYTick;
|
|
88
|
+
private toScientificUnicode;
|
|
89
|
+
}
|