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
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Chart } from '../core/chart/types';
|
|
2
|
+
import { Bounds } from '../types';
|
|
3
|
+
import { ChartTheme } from '../theme';
|
|
4
|
+
import { PluginContext, PluginStorage, PickResult, ChartPlugin } from './types';
|
|
5
|
+
|
|
6
|
+
declare class PluginStorageImpl implements PluginStorage {
|
|
7
|
+
private data;
|
|
8
|
+
constructor(_pluginName: string);
|
|
9
|
+
get<T>(key: string): T | undefined;
|
|
10
|
+
set<T>(key: string, value: T): void;
|
|
11
|
+
remove(key: string): void;
|
|
12
|
+
clear(): void;
|
|
13
|
+
keys(): string[];
|
|
14
|
+
_serialize(): Record<string, unknown>;
|
|
15
|
+
_deserialize(data: Record<string, unknown>): void;
|
|
16
|
+
}
|
|
17
|
+
export interface ContextDependencies {
|
|
18
|
+
chart: Chart;
|
|
19
|
+
container: HTMLDivElement;
|
|
20
|
+
theme: ChartTheme;
|
|
21
|
+
getGL?: () => WebGLRenderingContext | WebGL2RenderingContext | undefined;
|
|
22
|
+
get2DContext?: () => CanvasRenderingContext2D | undefined;
|
|
23
|
+
getPixelRatio: () => number;
|
|
24
|
+
getCanvasSize: () => {
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
};
|
|
28
|
+
getPlotArea: () => {
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
width: number;
|
|
32
|
+
height: number;
|
|
33
|
+
};
|
|
34
|
+
getViewBounds: () => Bounds;
|
|
35
|
+
getYAxisBounds: (yAxisId?: string) => {
|
|
36
|
+
yMin: number;
|
|
37
|
+
yMax: number;
|
|
38
|
+
};
|
|
39
|
+
dataToPixelX: (x: number) => number;
|
|
40
|
+
dataToPixelY: (y: number, yAxisId?: string) => number;
|
|
41
|
+
pixelToDataX: (px: number) => number;
|
|
42
|
+
pixelToDataY: (py: number, yAxisId?: string) => number;
|
|
43
|
+
findNearestPoint?: (px: number, py: number, radius?: number) => PickResult | null;
|
|
44
|
+
getPlugin: (name: string) => ChartPlugin | undefined;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Create a complete plugin context from chart dependencies
|
|
48
|
+
*/
|
|
49
|
+
export declare function createPluginContext(pluginName: string, deps: ContextDependencies): PluginContext & {
|
|
50
|
+
_cleanup: () => void;
|
|
51
|
+
_getStorage: () => PluginStorageImpl;
|
|
52
|
+
};
|
|
53
|
+
export {};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { ChartTheme } from '../theme';
|
|
2
|
+
import { ChartPlugin, PluginFactory, PluginManager, PluginManifest, BeforeRenderEvent, AfterRenderEvent, ViewChangeEvent, SeriesChangeEvent, DataUpdateEvent, InteractionEvent } from './types';
|
|
3
|
+
import { ContextDependencies } from './PluginContext';
|
|
4
|
+
|
|
5
|
+
export declare class PluginManagerImpl implements PluginManager {
|
|
6
|
+
private plugins;
|
|
7
|
+
private deps;
|
|
8
|
+
private destroyed;
|
|
9
|
+
private hooksBeforeRender;
|
|
10
|
+
private hooksAfterRender;
|
|
11
|
+
private hooksRenderWebGL;
|
|
12
|
+
private hooksRenderOverlay;
|
|
13
|
+
private hooksInteraction;
|
|
14
|
+
private hooksViewChange;
|
|
15
|
+
private hooksDataUpdate;
|
|
16
|
+
private hooksSeriesAdd;
|
|
17
|
+
private hooksSeriesRemove;
|
|
18
|
+
private hooksSeriesChange;
|
|
19
|
+
private hooksResize;
|
|
20
|
+
private hooksThemeChange;
|
|
21
|
+
private hooksSelectionChange;
|
|
22
|
+
private hooksSerialize;
|
|
23
|
+
constructor(dependencies: ContextDependencies);
|
|
24
|
+
/**
|
|
25
|
+
* Register and initialize a plugin
|
|
26
|
+
*/
|
|
27
|
+
use<TConfig>(pluginOrFactory: ChartPlugin<TConfig> | PluginFactory<TConfig>, config?: TConfig): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Remove a plugin
|
|
30
|
+
*/
|
|
31
|
+
remove(name: string): Promise<boolean>;
|
|
32
|
+
/**
|
|
33
|
+
* Get a plugin instance
|
|
34
|
+
*/
|
|
35
|
+
get<T extends ChartPlugin = ChartPlugin>(name: string): T | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Check if a plugin is loaded
|
|
38
|
+
*/
|
|
39
|
+
has(name: string): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Get all loaded plugin names
|
|
42
|
+
*/
|
|
43
|
+
getNames(): string[];
|
|
44
|
+
/**
|
|
45
|
+
* Get all loaded plugin manifests
|
|
46
|
+
*/
|
|
47
|
+
getManifests(): PluginManifest[];
|
|
48
|
+
/**
|
|
49
|
+
* Update plugin configuration
|
|
50
|
+
*/
|
|
51
|
+
configure<TConfig>(name: string, config: TConfig): void;
|
|
52
|
+
/**
|
|
53
|
+
* Notify all plugins of a hook event
|
|
54
|
+
*/
|
|
55
|
+
notify(hook: string, ...args: unknown[]): void;
|
|
56
|
+
/**
|
|
57
|
+
* Notify beforeRender hooks
|
|
58
|
+
* Returns false if any plugin wants to skip rendering
|
|
59
|
+
*/
|
|
60
|
+
notifyBeforeRender(event: BeforeRenderEvent): boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Notify afterRender hooks
|
|
63
|
+
*/
|
|
64
|
+
notifyAfterRender(event: AfterRenderEvent): void;
|
|
65
|
+
/**
|
|
66
|
+
* Notify WebGL render hooks
|
|
67
|
+
*/
|
|
68
|
+
notifyRenderWebGL(event: AfterRenderEvent): void;
|
|
69
|
+
/**
|
|
70
|
+
* Notify overlay render hooks
|
|
71
|
+
*/
|
|
72
|
+
notifyRenderOverlay(event: AfterRenderEvent): void;
|
|
73
|
+
/**
|
|
74
|
+
* Notify interaction hooks
|
|
75
|
+
* Returns false if any plugin prevents default
|
|
76
|
+
*/
|
|
77
|
+
notifyInteraction(event: InteractionEvent): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Notify view change hooks
|
|
80
|
+
*/
|
|
81
|
+
notifyViewChange(event: ViewChangeEvent): void;
|
|
82
|
+
/**
|
|
83
|
+
* Notify data update hooks
|
|
84
|
+
*/
|
|
85
|
+
notifyDataUpdate(event: DataUpdateEvent): void;
|
|
86
|
+
/**
|
|
87
|
+
* Notify series add hooks
|
|
88
|
+
*/
|
|
89
|
+
notifySeriesAdd(event: SeriesChangeEvent): void;
|
|
90
|
+
/**
|
|
91
|
+
* Notify series remove hooks
|
|
92
|
+
*/
|
|
93
|
+
notifySeriesRemove(event: SeriesChangeEvent): void;
|
|
94
|
+
/**
|
|
95
|
+
* Notify series change hooks
|
|
96
|
+
*/
|
|
97
|
+
notifySeriesChange(event: SeriesChangeEvent): void;
|
|
98
|
+
/**
|
|
99
|
+
* Notify resize hooks
|
|
100
|
+
*/
|
|
101
|
+
notifyResize(size: {
|
|
102
|
+
width: number;
|
|
103
|
+
height: number;
|
|
104
|
+
}): void;
|
|
105
|
+
/**
|
|
106
|
+
* Notify theme change hooks
|
|
107
|
+
*/
|
|
108
|
+
notifyThemeChange(theme: ChartTheme): void;
|
|
109
|
+
/**
|
|
110
|
+
* Notify selection change hooks
|
|
111
|
+
*/
|
|
112
|
+
notifySelectionChange(points: readonly import('../core/selection').SelectedPoint[]): void;
|
|
113
|
+
/**
|
|
114
|
+
* Collect serialization data from plugins
|
|
115
|
+
*/
|
|
116
|
+
collectSerializationData(): Record<string, unknown>;
|
|
117
|
+
/**
|
|
118
|
+
* Restore plugin data from serialization
|
|
119
|
+
*/
|
|
120
|
+
restoreSerializationData(data: Record<string, unknown>): void;
|
|
121
|
+
/**
|
|
122
|
+
* Destroy all plugins and cleanup
|
|
123
|
+
*/
|
|
124
|
+
destroy(): void;
|
|
125
|
+
private checkDependencies;
|
|
126
|
+
private findDependents;
|
|
127
|
+
private rebuildHookCaches;
|
|
128
|
+
private clearHookCaches;
|
|
129
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { PluginFactory, PluginManifest, PluginCapability, PluginRegistry, PluginRegistryEntry } from './types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Get the global plugin registry singleton
|
|
5
|
+
*/
|
|
6
|
+
export declare function getPluginRegistry(): PluginRegistry;
|
|
7
|
+
/**
|
|
8
|
+
* Register a plugin in the global registry
|
|
9
|
+
* Shorthand for getPluginRegistry().register()
|
|
10
|
+
*/
|
|
11
|
+
export declare function registerPlugin(entry: PluginRegistryEntry): void;
|
|
12
|
+
/**
|
|
13
|
+
* Create a plugin factory with manifest validation
|
|
14
|
+
*/
|
|
15
|
+
export declare function definePlugin<TConfig = unknown>(manifest: PluginManifest, factory: (config?: TConfig) => Omit<import('./types').ChartPlugin<TConfig>, "manifest">): PluginFactory<TConfig>;
|
|
16
|
+
/**
|
|
17
|
+
* Register a plugin from definition
|
|
18
|
+
*/
|
|
19
|
+
export declare function defineAndRegister<TConfig = unknown>(manifest: PluginManifest, factory: (config?: TConfig) => Omit<import('./types').ChartPlugin<TConfig>, "manifest">): PluginFactory<TConfig>;
|
|
20
|
+
/**
|
|
21
|
+
* Load a plugin from the registry by name
|
|
22
|
+
*/
|
|
23
|
+
export declare function loadPlugin<TConfig = unknown>(name: string, config?: TConfig): Promise<import('./types').ChartPlugin<TConfig> | undefined>;
|
|
24
|
+
/**
|
|
25
|
+
* List available plugins by category
|
|
26
|
+
*/
|
|
27
|
+
export declare function listPluginsByCategory(): Record<PluginCapability, PluginManifest[]>;
|
|
28
|
+
/**
|
|
29
|
+
* Validate a plugin manifest
|
|
30
|
+
*/
|
|
31
|
+
export declare function validateManifest(manifest: PluginManifest): string[];
|
|
32
|
+
/**
|
|
33
|
+
* Validate a plugin for compatibility
|
|
34
|
+
*/
|
|
35
|
+
export declare function checkPluginCompatibility(manifest: PluginManifest, engineVersion: string): {
|
|
36
|
+
compatible: boolean;
|
|
37
|
+
warnings: string[];
|
|
38
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contour Plot Generation (Marching Squares)
|
|
3
|
+
*/
|
|
4
|
+
export interface ContourPoint {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
}
|
|
8
|
+
export interface ContourLine {
|
|
9
|
+
level: number;
|
|
10
|
+
points: ContourPoint[];
|
|
11
|
+
}
|
|
12
|
+
export interface ContourOptions {
|
|
13
|
+
levels?: number[];
|
|
14
|
+
numLevels?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Generate contour lines from a 2D grid of values
|
|
18
|
+
* Values are assumed to be in row-major order: z = values[y * width + x]
|
|
19
|
+
*/
|
|
20
|
+
export declare function generateContours(z: Float32Array | number[], xValues: Float32Array | number[], yValues: Float32Array | number[], options?: ContourOptions): ContourLine[];
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fast Fourier Transform (FFT) Implementation
|
|
3
|
+
*
|
|
4
|
+
* Provides:
|
|
5
|
+
* - FFT for spectral analysis
|
|
6
|
+
* - Inverse FFT
|
|
7
|
+
* - Power spectrum
|
|
8
|
+
* - Frequency bins calculation
|
|
9
|
+
*/
|
|
10
|
+
/** Complex number representation */
|
|
11
|
+
export interface Complex {
|
|
12
|
+
re: number;
|
|
13
|
+
im: number;
|
|
14
|
+
}
|
|
15
|
+
/** FFT Result */
|
|
16
|
+
export interface FFTResult {
|
|
17
|
+
/** Frequency bins in Hz (if sample rate provided) or normalized */
|
|
18
|
+
frequency: Float32Array;
|
|
19
|
+
/** Magnitude spectrum */
|
|
20
|
+
magnitude: Float32Array;
|
|
21
|
+
/** Phase spectrum in radians */
|
|
22
|
+
phase: Float32Array;
|
|
23
|
+
/** Full complex spectrum as Complex[] array */
|
|
24
|
+
complex: Complex[];
|
|
25
|
+
/** Real part of full spectrum as Float32Array */
|
|
26
|
+
real: Float32Array;
|
|
27
|
+
/** Imaginary part of full spectrum as Float32Array */
|
|
28
|
+
imag: Float32Array;
|
|
29
|
+
}
|
|
30
|
+
/** Complex FFT Result - full spectrum with separate real/imag arrays */
|
|
31
|
+
export interface ComplexFFTResult {
|
|
32
|
+
/** Real part of spectrum */
|
|
33
|
+
real: Float32Array;
|
|
34
|
+
/** Imaginary part of spectrum */
|
|
35
|
+
imag: Float32Array;
|
|
36
|
+
/** Frequency bins in Hz (if sample rate provided) */
|
|
37
|
+
frequency: Float32Array;
|
|
38
|
+
/** Magnitude spectrum (sqrt(real² + imag²)) */
|
|
39
|
+
magnitude: Float32Array;
|
|
40
|
+
/** Phase spectrum in radians (atan2(imag, real)) */
|
|
41
|
+
phase: Float32Array;
|
|
42
|
+
/** Original spectrum length (power of 2) */
|
|
43
|
+
length: number;
|
|
44
|
+
/** Nyquist index (length / 2) */
|
|
45
|
+
nyquist: number;
|
|
46
|
+
}
|
|
47
|
+
/** Power spectrum result */
|
|
48
|
+
export interface PowerSpectrumResult {
|
|
49
|
+
/** Frequency bins */
|
|
50
|
+
frequency: Float32Array;
|
|
51
|
+
/** Power values (magnitude squared) */
|
|
52
|
+
power: Float32Array;
|
|
53
|
+
/** Power in dB */
|
|
54
|
+
powerDb: Float32Array;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Compute FFT using Cooley-Tukey algorithm
|
|
58
|
+
* Input length must be a power of 2
|
|
59
|
+
*/
|
|
60
|
+
export declare function fft(input: Float32Array | Float64Array | number[]): Complex[];
|
|
61
|
+
/**
|
|
62
|
+
* Compute inverse FFT
|
|
63
|
+
*/
|
|
64
|
+
export declare function ifft(spectrum: Complex[]): Float32Array;
|
|
65
|
+
/**
|
|
66
|
+
* Find next power of 2
|
|
67
|
+
*/
|
|
68
|
+
export declare function nextPowerOf2(n: number): number;
|
|
69
|
+
/**
|
|
70
|
+
* Compute full FFT analysis with frequencies and magnitudes
|
|
71
|
+
*/
|
|
72
|
+
export declare function analyzeSpectrum(data: Float32Array | Float64Array | number[], sampleRate?: number): FFTResult;
|
|
73
|
+
/**
|
|
74
|
+
* Compute power spectrum
|
|
75
|
+
*/
|
|
76
|
+
export declare function powerSpectrum(data: Float32Array | Float64Array | number[], sampleRate?: number): PowerSpectrumResult;
|
|
77
|
+
/**
|
|
78
|
+
* Find dominant frequency in signal
|
|
79
|
+
*/
|
|
80
|
+
export declare function dominantFrequency(data: Float32Array | Float64Array | number[], sampleRate?: number, minFrequency?: number): {
|
|
81
|
+
frequency: number;
|
|
82
|
+
magnitude: number;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Apply Hanning window to data
|
|
86
|
+
*/
|
|
87
|
+
export declare function hanningWindow(data: Float32Array | Float64Array): Float32Array;
|
|
88
|
+
/**
|
|
89
|
+
* Apply Hamming window to data
|
|
90
|
+
*/
|
|
91
|
+
export declare function hammingWindow(data: Float32Array | Float64Array): Float32Array;
|
|
92
|
+
/**
|
|
93
|
+
* Apply Blackman window to data
|
|
94
|
+
*/
|
|
95
|
+
export declare function blackmanWindow(data: Float32Array | Float64Array): Float32Array;
|
|
96
|
+
/**
|
|
97
|
+
* Compute full complex FFT analysis with separate real and imaginary arrays
|
|
98
|
+
* This is useful when you need direct access to real/imag components
|
|
99
|
+
*/
|
|
100
|
+
export declare function analyzeComplexSpectrum(data: Float32Array | Float64Array | number[], sampleRate?: number): ComplexFFTResult;
|
|
101
|
+
/**
|
|
102
|
+
* Compute FFT from complex input (real + imaginary arrays)
|
|
103
|
+
* Useful for processing complex signals or chaining FFT operations
|
|
104
|
+
*/
|
|
105
|
+
export declare function fftFromComplexInput(real: Float32Array | Float64Array | number[], imag: Float32Array | Float64Array | number[]): ComplexFFTResult;
|
|
106
|
+
/**
|
|
107
|
+
* Convert Complex[] array to separate real and imaginary Float32Arrays
|
|
108
|
+
*/
|
|
109
|
+
export declare function complexToArrays(complex: Complex[]): {
|
|
110
|
+
real: Float32Array;
|
|
111
|
+
imag: Float32Array;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Convert separate real and imaginary arrays to Complex[] array
|
|
115
|
+
*/
|
|
116
|
+
export declare function arraysToComplex(real: Float32Array | Float64Array | number[], imag: Float32Array | Float64Array | number[]): Complex[];
|
|
117
|
+
/**
|
|
118
|
+
* Compute inverse FFT from separate real and imaginary arrays
|
|
119
|
+
* Returns the real part of the inverse transform
|
|
120
|
+
*/
|
|
121
|
+
export declare function ifftFromArrays(real: Float32Array | Float64Array | number[], imag: Float32Array | Float64Array | number[]): Float32Array;
|
|
122
|
+
/**
|
|
123
|
+
* Compute inverse FFT returning complex result (both real and imaginary parts)
|
|
124
|
+
*/
|
|
125
|
+
export declare function ifftComplex(spectrum: Complex[]): {
|
|
126
|
+
real: Float32Array;
|
|
127
|
+
imag: Float32Array;
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* Get only positive frequencies (up to Nyquist) from complex spectrum
|
|
131
|
+
*/
|
|
132
|
+
export declare function getPositiveFrequencies(result: ComplexFFTResult): {
|
|
133
|
+
real: Float32Array;
|
|
134
|
+
imag: Float32Array;
|
|
135
|
+
frequency: Float32Array;
|
|
136
|
+
magnitude: Float32Array;
|
|
137
|
+
phase: Float32Array;
|
|
138
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Digital Filters Implementation
|
|
3
|
+
*
|
|
4
|
+
* Provides:
|
|
5
|
+
* - Low-pass filter
|
|
6
|
+
* - High-pass filter
|
|
7
|
+
* - Band-pass filter
|
|
8
|
+
* - Band-stop (notch) filter
|
|
9
|
+
* - Butterworth filter
|
|
10
|
+
* - Moving average (for smoothing)
|
|
11
|
+
* - Savitzky-Golay filter
|
|
12
|
+
*/
|
|
13
|
+
export type FilterType = 'lowpass' | 'highpass' | 'bandpass' | 'bandstop';
|
|
14
|
+
export interface FilterOptions {
|
|
15
|
+
/** Cutoff frequency in Hz (or normalized 0-1) */
|
|
16
|
+
cutoff: number;
|
|
17
|
+
/** Second cutoff for bandpass/bandstop filters */
|
|
18
|
+
cutoffHigh?: number;
|
|
19
|
+
/** Sample rate in Hz (default: 1.0 for normalized) */
|
|
20
|
+
sampleRate?: number;
|
|
21
|
+
/** Filter order (default: 2) */
|
|
22
|
+
order?: number;
|
|
23
|
+
}
|
|
24
|
+
export interface ButterworthOptions extends FilterOptions {
|
|
25
|
+
/** Filter type */
|
|
26
|
+
type: FilterType;
|
|
27
|
+
}
|
|
28
|
+
export interface SingleFrequencyFilterOptions {
|
|
29
|
+
/** Frequency to remove in Hz */
|
|
30
|
+
frequency: number;
|
|
31
|
+
/** Sampling rate in Hz */
|
|
32
|
+
sampleRate: number;
|
|
33
|
+
/** Bandwidth of the notch in Hz (default: 1.0) */
|
|
34
|
+
bandwidth?: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Apply a simple low-pass FIR filter
|
|
38
|
+
*/
|
|
39
|
+
export declare function lowPassFilter(data: Float32Array | Float64Array, cutoffHz: number, sampleRate: number, order?: number): Float32Array;
|
|
40
|
+
/**
|
|
41
|
+
* Apply a simple high-pass FIR filter
|
|
42
|
+
*/
|
|
43
|
+
export declare function highPassFilter(data: Float32Array | Float64Array, cutoffHz: number, sampleRate: number, order?: number): Float32Array;
|
|
44
|
+
/**
|
|
45
|
+
* Apply a band-pass FIR filter
|
|
46
|
+
*/
|
|
47
|
+
export declare function bandPassFilter(data: Float32Array | Float64Array, lowCutoffHz: number, highCutoffHz: number, sampleRate: number, order?: number): Float32Array;
|
|
48
|
+
/**
|
|
49
|
+
* Apply a band-stop (notch) FIR filter
|
|
50
|
+
*/
|
|
51
|
+
export declare function bandStopFilter(data: Float32Array | Float64Array, lowCutoffHz: number, highCutoffHz: number, sampleRate: number, order?: number): Float32Array;
|
|
52
|
+
/**
|
|
53
|
+
* Apply Butterworth filter (IIR)
|
|
54
|
+
*/
|
|
55
|
+
export declare function butterworth(data: Float32Array | Float64Array, options: ButterworthOptions): Float32Array;
|
|
56
|
+
/**
|
|
57
|
+
* Apply a single frequency notch filter to remove periodic noise.
|
|
58
|
+
* Implementing a 2nd order IIR notch filter.
|
|
59
|
+
*/
|
|
60
|
+
export declare function singleFrequencyFilter(data: Float32Array | Float64Array, options: SingleFrequencyFilterOptions): Float32Array;
|
|
61
|
+
/**
|
|
62
|
+
* Exponential moving average filter
|
|
63
|
+
*/
|
|
64
|
+
export declare function exponentialMovingAverage(data: Float32Array | Float64Array, alpha?: number): Float32Array;
|
|
65
|
+
/**
|
|
66
|
+
* Gaussian smoothing filter
|
|
67
|
+
*/
|
|
68
|
+
export declare function gaussianSmooth(data: Float32Array | Float64Array, sigma?: number): Float32Array;
|
|
69
|
+
/**
|
|
70
|
+
* Savitzky-Golay smoothing filter
|
|
71
|
+
*/
|
|
72
|
+
export declare function savitzkyGolay(data: Float32Array | Float64Array, windowSize?: number, polynomialOrder?: number): Float32Array;
|
|
73
|
+
/**
|
|
74
|
+
* Median filter (good for spike removal)
|
|
75
|
+
*/
|
|
76
|
+
export declare function medianFilter(data: Float32Array | Float64Array, windowSize?: number): Float32Array;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type FitType = 'linear' | 'polynomial' | 'exponential' | 'logarithmic' | 'power';
|
|
2
|
+
export interface FitOptions {
|
|
3
|
+
/** Degree for polynomial fit (default: 2) */
|
|
4
|
+
degree?: number;
|
|
5
|
+
/** Custom label for the equation */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** Number of decimals in equation string */
|
|
8
|
+
precision?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface FitResult {
|
|
11
|
+
type: FitType;
|
|
12
|
+
/** Coefficients (a, b, c...) */
|
|
13
|
+
coefficients: number[];
|
|
14
|
+
/** Formatted equation string */
|
|
15
|
+
equation: string;
|
|
16
|
+
/** Coefficient of determination */
|
|
17
|
+
rSquared: number;
|
|
18
|
+
/** Function to calculate value at X */
|
|
19
|
+
predict: (x: number) => number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Perform regression on a dataset
|
|
23
|
+
*/
|
|
24
|
+
export declare function fitData(x: number[] | Float32Array, y: number[] | Float32Array, type: FitType, options?: FitOptions): FitResult;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ChartPlugin } from '../types';
|
|
2
|
+
|
|
3
|
+
export { formatWithPrefix, formatValue, formatScientific, getBestPrefix, detectCycles, generateCycleColors, detectPeaks, validateData, calculateStats, movingAverage, downsampleLTTB, subtractBaseline, } from './utils';
|
|
4
|
+
export { solveLinearSystem, calculateR2, integrate, derivative, cumulativeIntegral, } from './math';
|
|
5
|
+
export { fitData, } from './fitting';
|
|
6
|
+
export type { CycleInfo, Peak, PrefixInfo, ValidationResult, DataStats, } from './utils';
|
|
7
|
+
export type { FitType, FitOptions, FitResult, } from './fitting';
|
|
8
|
+
export * from './contours';
|
|
9
|
+
export { fft, ifft, analyzeSpectrum, powerSpectrum, dominantFrequency, hanningWindow, hammingWindow, blackmanWindow, nextPowerOf2, analyzeComplexSpectrum, fftFromComplexInput, complexToArrays, arraysToComplex, ifftFromArrays, ifftComplex, getPositiveFrequencies, } from './fft';
|
|
10
|
+
export type { Complex, FFTResult, ComplexFFTResult, PowerSpectrumResult, } from './fft';
|
|
11
|
+
export { lowPassFilter, highPassFilter, bandPassFilter, bandStopFilter, butterworth, exponentialMovingAverage, gaussianSmooth, savitzkyGolay, medianFilter, singleFrequencyFilter, } from './filters';
|
|
12
|
+
export type { FilterType, FilterOptions, ButterworthOptions, SingleFrequencyFilterOptions, } from './filters';
|
|
13
|
+
export { crossCorrelation, autoCorrelation, detectAnomalies, trapezoidalIntegration, simpsonsIntegration, cumulativeIntegration as cumulativeIntegral2, tTest, } from './statistics';
|
|
14
|
+
export type { CorrelationResult, AnomalyResult, AnomalyOptions, TTestResult, } from './statistics';
|
|
15
|
+
export { sma, ema, wma, dema, tema, rsi, macd, stochastic, roc, momentum, bollingerBands, atr, standardDeviation, vwap, obv, adx, aroon, percentChange, cumsum, normalize, } from './indicators';
|
|
16
|
+
export type { IndicatorResult, OHLCData, } from './indicators';
|
|
17
|
+
export interface PluginAnalysisConfig {
|
|
18
|
+
/** Enable worker-based off-main-thread processing */
|
|
19
|
+
useWorkers?: boolean;
|
|
20
|
+
/** Precision for statistical calculations */
|
|
21
|
+
precision?: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* SciPlot Analysis Plugin
|
|
25
|
+
*
|
|
26
|
+
* Adds comprehensive data analysis capabilities to the chart.
|
|
27
|
+
*/
|
|
28
|
+
export declare function PluginAnalysis(_config?: PluginAnalysisConfig): ChartPlugin<PluginAnalysisConfig>;
|
|
29
|
+
export default PluginAnalysis;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sci Plot - Financial/Technical Indicators Module
|
|
3
|
+
*
|
|
4
|
+
* Provides common financial and technical analysis indicators:
|
|
5
|
+
* - Moving Averages (SMA, EMA, WMA)
|
|
6
|
+
* - Momentum Indicators (RSI, MACD, Stochastic)
|
|
7
|
+
* - Volatility (Bollinger Bands, ATR)
|
|
8
|
+
* - Volume (VWAP, OBV)
|
|
9
|
+
* - Trend (ADX, Aroon)
|
|
10
|
+
*
|
|
11
|
+
* @module indicators
|
|
12
|
+
*/
|
|
13
|
+
export interface IndicatorResult {
|
|
14
|
+
/** Indicator values (NaN for insufficient data) */
|
|
15
|
+
values: Float32Array;
|
|
16
|
+
/** Additional line (e.g., signal line for MACD) */
|
|
17
|
+
signal?: Float32Array;
|
|
18
|
+
/** Upper band (e.g., Bollinger upper) */
|
|
19
|
+
upper?: Float32Array;
|
|
20
|
+
/** Lower band (e.g., Bollinger lower) */
|
|
21
|
+
lower?: Float32Array;
|
|
22
|
+
/** Histogram (e.g., MACD histogram) */
|
|
23
|
+
histogram?: Float32Array;
|
|
24
|
+
}
|
|
25
|
+
export interface OHLCData {
|
|
26
|
+
open: Float32Array | Float64Array;
|
|
27
|
+
high: Float32Array | Float64Array;
|
|
28
|
+
low: Float32Array | Float64Array;
|
|
29
|
+
close: Float32Array | Float64Array;
|
|
30
|
+
volume?: Float32Array | Float64Array;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Simple Moving Average (SMA)
|
|
34
|
+
* @param data Input data array
|
|
35
|
+
* @param period Number of periods
|
|
36
|
+
*/
|
|
37
|
+
export declare function sma(data: Float32Array | Float64Array | number[], period: number): Float32Array;
|
|
38
|
+
/**
|
|
39
|
+
* Exponential Moving Average (EMA)
|
|
40
|
+
* @param data Input data array
|
|
41
|
+
* @param period Number of periods
|
|
42
|
+
*/
|
|
43
|
+
export declare function ema(data: Float32Array | Float64Array | number[], period: number): Float32Array;
|
|
44
|
+
/**
|
|
45
|
+
* Weighted Moving Average (WMA)
|
|
46
|
+
* @param data Input data array
|
|
47
|
+
* @param period Number of periods
|
|
48
|
+
*/
|
|
49
|
+
export declare function wma(data: Float32Array | Float64Array | number[], period: number): Float32Array;
|
|
50
|
+
/**
|
|
51
|
+
* Double Exponential Moving Average (DEMA)
|
|
52
|
+
* @param data Input data array
|
|
53
|
+
* @param period Number of periods
|
|
54
|
+
*/
|
|
55
|
+
export declare function dema(data: Float32Array | Float64Array | number[], period: number): Float32Array;
|
|
56
|
+
/**
|
|
57
|
+
* Triple Exponential Moving Average (TEMA)
|
|
58
|
+
* @param data Input data array
|
|
59
|
+
* @param period Number of periods
|
|
60
|
+
*/
|
|
61
|
+
export declare function tema(data: Float32Array | Float64Array | number[], period: number): Float32Array;
|
|
62
|
+
/**
|
|
63
|
+
* Relative Strength Index (RSI)
|
|
64
|
+
* @param data Close prices
|
|
65
|
+
* @param period RSI period (default: 14)
|
|
66
|
+
*/
|
|
67
|
+
export declare function rsi(data: Float32Array | Float64Array | number[], period?: number): Float32Array;
|
|
68
|
+
/**
|
|
69
|
+
* Moving Average Convergence Divergence (MACD)
|
|
70
|
+
* @param data Close prices
|
|
71
|
+
* @param fastPeriod Fast EMA period (default: 12)
|
|
72
|
+
* @param slowPeriod Slow EMA period (default: 26)
|
|
73
|
+
* @param signalPeriod Signal line period (default: 9)
|
|
74
|
+
*/
|
|
75
|
+
export declare function macd(data: Float32Array | Float64Array | number[], fastPeriod?: number, slowPeriod?: number, signalPeriod?: number): IndicatorResult;
|
|
76
|
+
/**
|
|
77
|
+
* Stochastic Oscillator
|
|
78
|
+
* @param ohlc OHLC data
|
|
79
|
+
* @param kPeriod %K period (default: 14)
|
|
80
|
+
* @param dPeriod %D smoothing period (default: 3)
|
|
81
|
+
*/
|
|
82
|
+
export declare function stochastic(ohlc: OHLCData, kPeriod?: number, dPeriod?: number): IndicatorResult;
|
|
83
|
+
/**
|
|
84
|
+
* Rate of Change (ROC)
|
|
85
|
+
* @param data Close prices
|
|
86
|
+
* @param period ROC period (default: 10)
|
|
87
|
+
*/
|
|
88
|
+
export declare function roc(data: Float32Array | Float64Array | number[], period?: number): Float32Array;
|
|
89
|
+
/**
|
|
90
|
+
* Momentum
|
|
91
|
+
* @param data Close prices
|
|
92
|
+
* @param period Momentum period (default: 10)
|
|
93
|
+
*/
|
|
94
|
+
export declare function momentum(data: Float32Array | Float64Array | number[], period?: number): Float32Array;
|
|
95
|
+
/**
|
|
96
|
+
* Bollinger Bands
|
|
97
|
+
* @param data Close prices
|
|
98
|
+
* @param period SMA period (default: 20)
|
|
99
|
+
* @param stdDev Standard deviation multiplier (default: 2)
|
|
100
|
+
*/
|
|
101
|
+
export declare function bollingerBands(data: Float32Array | Float64Array | number[], period?: number, stdDev?: number): IndicatorResult;
|
|
102
|
+
/**
|
|
103
|
+
* Average True Range (ATR)
|
|
104
|
+
* @param ohlc OHLC data
|
|
105
|
+
* @param period ATR period (default: 14)
|
|
106
|
+
*/
|
|
107
|
+
export declare function atr(ohlc: OHLCData, period?: number): Float32Array;
|
|
108
|
+
/**
|
|
109
|
+
* Standard Deviation
|
|
110
|
+
* @param data Input data
|
|
111
|
+
* @param period Period for calculation (default: 20)
|
|
112
|
+
*/
|
|
113
|
+
export declare function standardDeviation(data: Float32Array | Float64Array | number[], period?: number): Float32Array;
|
|
114
|
+
/**
|
|
115
|
+
* Volume Weighted Average Price (VWAP)
|
|
116
|
+
* @param ohlc OHLC data with volume
|
|
117
|
+
*/
|
|
118
|
+
export declare function vwap(ohlc: OHLCData): Float32Array;
|
|
119
|
+
/**
|
|
120
|
+
* On-Balance Volume (OBV)
|
|
121
|
+
* @param close Close prices
|
|
122
|
+
* @param volume Volume data
|
|
123
|
+
*/
|
|
124
|
+
export declare function obv(close: Float32Array | Float64Array | number[], volume: Float32Array | Float64Array | number[]): Float32Array;
|
|
125
|
+
/**
|
|
126
|
+
* Average Directional Index (ADX)
|
|
127
|
+
* @param ohlc OHLC data
|
|
128
|
+
* @param period ADX period (default: 14)
|
|
129
|
+
*/
|
|
130
|
+
export declare function adx(ohlc: OHLCData, period?: number): IndicatorResult;
|
|
131
|
+
/**
|
|
132
|
+
* Aroon Indicator
|
|
133
|
+
* @param ohlc OHLC data
|
|
134
|
+
* @param period Aroon period (default: 25)
|
|
135
|
+
*/
|
|
136
|
+
export declare function aroon(ohlc: OHLCData, period?: number): IndicatorResult;
|
|
137
|
+
/**
|
|
138
|
+
* Calculate percentage change
|
|
139
|
+
*/
|
|
140
|
+
export declare function percentChange(data: Float32Array | Float64Array | number[], period?: number): Float32Array;
|
|
141
|
+
/**
|
|
142
|
+
* Calculate cumulative sum
|
|
143
|
+
*/
|
|
144
|
+
export declare function cumsum(data: Float32Array | Float64Array | number[]): Float32Array;
|
|
145
|
+
/**
|
|
146
|
+
* Normalize data to 0-100 range
|
|
147
|
+
*/
|
|
148
|
+
export declare function normalize(data: Float32Array | Float64Array | number[]): Float32Array;
|