@tachyon-charts/core 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +10 -2
- package/dist/axes/axis.d.ts +117 -0
- package/dist/axes/axis.d.ts.map +1 -0
- package/dist/axes/axis.js +239 -0
- package/dist/axes/axis.js.map +1 -0
- package/dist/axes/category-axis.d.ts +23 -0
- package/dist/axes/category-axis.d.ts.map +1 -0
- package/dist/axes/category-axis.js +78 -0
- package/dist/axes/category-axis.js.map +1 -0
- package/dist/axes/color-axis.d.ts +51 -0
- package/dist/axes/color-axis.d.ts.map +1 -0
- package/dist/axes/color-axis.js +121 -0
- package/dist/axes/color-axis.js.map +1 -0
- package/dist/axes/date-time-axis.d.ts +91 -0
- package/dist/axes/date-time-axis.d.ts.map +1 -0
- package/dist/axes/date-time-axis.js +435 -0
- package/dist/axes/date-time-axis.js.map +1 -0
- package/dist/axes/index.d.ts +8 -0
- package/dist/axes/index.d.ts.map +1 -0
- package/dist/axes/index.js +8 -0
- package/dist/axes/index.js.map +1 -0
- package/dist/axes/log-axis.d.ts +37 -0
- package/dist/axes/log-axis.d.ts.map +1 -0
- package/dist/axes/log-axis.js +193 -0
- package/dist/axes/log-axis.js.map +1 -0
- package/dist/axes/numeric-axis.d.ts +41 -0
- package/dist/axes/numeric-axis.d.ts.map +1 -0
- package/dist/axes/numeric-axis.js +205 -0
- package/dist/axes/numeric-axis.js.map +1 -0
- package/dist/axes/time-gaps.d.ts +47 -0
- package/dist/axes/time-gaps.d.ts.map +1 -0
- package/dist/axes/time-gaps.js +145 -0
- package/dist/axes/time-gaps.js.map +1 -0
- package/dist/data/data-source.d.ts +79 -0
- package/dist/data/data-source.d.ts.map +1 -0
- package/dist/data/data-source.js +228 -0
- package/dist/data/data-source.js.map +1 -0
- package/dist/data/digital.d.ts +113 -0
- package/dist/data/digital.d.ts.map +1 -0
- package/dist/data/digital.js +262 -0
- package/dist/data/digital.js.map +1 -0
- package/dist/data/external-data-source.d.ts +37 -0
- package/dist/data/external-data-source.d.ts.map +1 -0
- package/dist/data/external-data-source.js +69 -0
- package/dist/data/external-data-source.js.map +1 -0
- package/dist/data/fifo-data-source.d.ts +94 -0
- package/dist/data/fifo-data-source.d.ts.map +1 -0
- package/dist/data/fifo-data-source.js +313 -0
- package/dist/data/fifo-data-source.js.map +1 -0
- package/dist/data/index.d.ts +8 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/index.js +8 -0
- package/dist/data/index.js.map +1 -0
- package/dist/data/polygon.d.ts +64 -0
- package/dist/data/polygon.d.ts.map +1 -0
- package/dist/data/polygon.js +294 -0
- package/dist/data/polygon.js.map +1 -0
- package/dist/data/source.d.ts +78 -0
- package/dist/data/source.d.ts.map +1 -0
- package/dist/data/source.js +114 -0
- package/dist/data/source.js.map +1 -0
- package/dist/data/worker-data.d.ts +148 -0
- package/dist/data/worker-data.d.ts.map +1 -0
- package/dist/data/worker-data.js +206 -0
- package/dist/data/worker-data.js.map +1 -0
- package/dist/fluent/chart-builder.d.ts +414 -0
- package/dist/fluent/chart-builder.d.ts.map +1 -0
- package/dist/fluent/chart-builder.js +704 -0
- package/dist/fluent/chart-builder.js.map +1 -0
- package/dist/fluent/index.d.ts +2 -0
- package/dist/fluent/index.d.ts.map +1 -0
- package/dist/fluent/index.js +2 -0
- package/dist/fluent/index.js.map +1 -0
- package/dist/generated/colormaps.d.ts +3 -0
- package/dist/generated/colormaps.d.ts.map +1 -0
- package/dist/generated/colormaps.js +12 -0
- package/dist/generated/colormaps.js.map +1 -0
- package/dist/generated/themes.d.ts +4 -0
- package/dist/generated/themes.d.ts.map +1 -0
- package/dist/generated/themes.js +11 -0
- package/dist/generated/themes.js.map +1 -0
- package/dist/hit-testing/hit-test.d.ts +29 -0
- package/dist/hit-testing/hit-test.d.ts.map +1 -0
- package/dist/hit-testing/hit-test.js +114 -0
- package/dist/hit-testing/hit-test.js.map +1 -0
- package/dist/hit-testing/index.d.ts +2 -0
- package/dist/hit-testing/index.d.ts.map +1 -0
- package/dist/hit-testing/index.js +2 -0
- package/dist/hit-testing/index.js.map +1 -0
- package/dist/hit-testing/types.d.ts +59 -0
- package/dist/hit-testing/types.d.ts.map +1 -0
- package/dist/hit-testing/types.js +72 -0
- package/dist/hit-testing/types.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/input/chart-interaction.d.ts +100 -0
- package/dist/input/chart-interaction.d.ts.map +1 -0
- package/dist/input/chart-interaction.js +270 -0
- package/dist/input/chart-interaction.js.map +1 -0
- package/dist/input/cursor-modifiers.d.ts +81 -0
- package/dist/input/cursor-modifiers.d.ts.map +1 -0
- package/dist/input/cursor-modifiers.js +158 -0
- package/dist/input/cursor-modifiers.js.map +1 -0
- package/dist/input/index.d.ts +6 -0
- package/dist/input/index.d.ts.map +1 -0
- package/dist/input/index.js +6 -0
- package/dist/input/index.js.map +1 -0
- package/dist/input/modifier-pipeline.d.ts +84 -0
- package/dist/input/modifier-pipeline.d.ts.map +1 -0
- package/dist/input/modifier-pipeline.js +270 -0
- package/dist/input/modifier-pipeline.js.map +1 -0
- package/dist/input/navigation-modifiers.d.ts +111 -0
- package/dist/input/navigation-modifiers.d.ts.map +1 -0
- package/dist/input/navigation-modifiers.js +379 -0
- package/dist/input/navigation-modifiers.js.map +1 -0
- package/dist/input/primitives.d.ts +87 -0
- package/dist/input/primitives.d.ts.map +1 -0
- package/dist/input/primitives.js +17 -0
- package/dist/input/primitives.js.map +1 -0
- package/dist/instruments/index.d.ts +8 -0
- package/dist/instruments/index.d.ts.map +1 -0
- package/dist/instruments/index.js +8 -0
- package/dist/instruments/index.js.map +1 -0
- package/dist/instruments/network-display.d.ts +122 -0
- package/dist/instruments/network-display.d.ts.map +1 -0
- package/dist/instruments/network-display.js +380 -0
- package/dist/instruments/network-display.js.map +1 -0
- package/dist/instruments/scope-chart.d.ts +73 -0
- package/dist/instruments/scope-chart.d.ts.map +1 -0
- package/dist/instruments/scope-chart.js +368 -0
- package/dist/instruments/scope-chart.js.map +1 -0
- package/dist/instruments/scope-display.d.ts +115 -0
- package/dist/instruments/scope-display.d.ts.map +1 -0
- package/dist/instruments/scope-display.js +237 -0
- package/dist/instruments/scope-display.js.map +1 -0
- package/dist/instruments/scope-persistence.d.ts +73 -0
- package/dist/instruments/scope-persistence.d.ts.map +1 -0
- package/dist/instruments/scope-persistence.js +253 -0
- package/dist/instruments/scope-persistence.js.map +1 -0
- package/dist/instruments/scope-trigger.d.ts +43 -0
- package/dist/instruments/scope-trigger.d.ts.map +1 -0
- package/dist/instruments/scope-trigger.js +110 -0
- package/dist/instruments/scope-trigger.js.map +1 -0
- package/dist/instruments/spectrum-chart.d.ts +76 -0
- package/dist/instruments/spectrum-chart.d.ts.map +1 -0
- package/dist/instruments/spectrum-chart.js +357 -0
- package/dist/instruments/spectrum-chart.js.map +1 -0
- package/dist/instruments/spectrum-display.d.ts +128 -0
- package/dist/instruments/spectrum-display.d.ts.map +1 -0
- package/dist/instruments/spectrum-display.js +334 -0
- package/dist/instruments/spectrum-display.js.map +1 -0
- package/dist/layout/chart-layout.d.ts +106 -0
- package/dist/layout/chart-layout.d.ts.map +1 -0
- package/dist/layout/chart-layout.js +267 -0
- package/dist/layout/chart-layout.js.map +1 -0
- package/dist/layout/index.d.ts +3 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/index.js +3 -0
- package/dist/layout/index.js.map +1 -0
- package/dist/layout/spread.d.ts +3 -0
- package/dist/layout/spread.d.ts.map +1 -0
- package/dist/layout/spread.js +11 -0
- package/dist/layout/spread.js.map +1 -0
- package/dist/layout/text-engine-measurer.d.ts +18 -0
- package/dist/layout/text-engine-measurer.d.ts.map +1 -0
- package/dist/layout/text-engine-measurer.js +30 -0
- package/dist/layout/text-engine-measurer.js.map +1 -0
- package/dist/locale/culture.d.ts +34 -0
- package/dist/locale/culture.d.ts.map +1 -0
- package/dist/locale/culture.js +109 -0
- package/dist/locale/culture.js.map +1 -0
- package/dist/locale/format.d.ts +25 -0
- package/dist/locale/format.d.ts.map +1 -0
- package/dist/locale/format.js +205 -0
- package/dist/locale/format.js.map +1 -0
- package/dist/locale/index.d.ts +4 -0
- package/dist/locale/index.d.ts.map +1 -0
- package/dist/locale/index.js +4 -0
- package/dist/locale/index.js.map +1 -0
- package/dist/locale/time-zone.d.ts +30 -0
- package/dist/locale/time-zone.d.ts.map +1 -0
- package/dist/locale/time-zone.js +134 -0
- package/dist/locale/time-zone.js.map +1 -0
- package/dist/numerics/break-scaling.d.ts +19 -0
- package/dist/numerics/break-scaling.d.ts.map +1 -0
- package/dist/numerics/break-scaling.js +84 -0
- package/dist/numerics/break-scaling.js.map +1 -0
- package/dist/numerics/index.d.ts +8 -0
- package/dist/numerics/index.d.ts.map +1 -0
- package/dist/numerics/index.js +8 -0
- package/dist/numerics/index.js.map +1 -0
- package/dist/numerics/marching-squares.d.ts +7 -0
- package/dist/numerics/marching-squares.d.ts.map +1 -0
- package/dist/numerics/marching-squares.js +87 -0
- package/dist/numerics/marching-squares.js.map +1 -0
- package/dist/numerics/nice.d.ts +13 -0
- package/dist/numerics/nice.d.ts.map +1 -0
- package/dist/numerics/nice.js +63 -0
- package/dist/numerics/nice.js.map +1 -0
- package/dist/numerics/range.d.ts +38 -0
- package/dist/numerics/range.d.ts.map +1 -0
- package/dist/numerics/range.js +71 -0
- package/dist/numerics/range.js.map +1 -0
- package/dist/numerics/scaling.d.ts +42 -0
- package/dist/numerics/scaling.d.ts.map +1 -0
- package/dist/numerics/scaling.js +52 -0
- package/dist/numerics/scaling.js.map +1 -0
- package/dist/numerics/seeded-random.d.ts +30 -0
- package/dist/numerics/seeded-random.d.ts.map +1 -0
- package/dist/numerics/seeded-random.js +137 -0
- package/dist/numerics/seeded-random.js.map +1 -0
- package/dist/numerics/statistics.d.ts +46 -0
- package/dist/numerics/statistics.d.ts.map +1 -0
- package/dist/numerics/statistics.js +115 -0
- package/dist/numerics/statistics.js.map +1 -0
- package/dist/numerics/transform.d.ts +33 -0
- package/dist/numerics/transform.d.ts.map +1 -0
- package/dist/numerics/transform.js +86 -0
- package/dist/numerics/transform.js.map +1 -0
- package/dist/overlays/annotation-edit.d.ts +34 -0
- package/dist/overlays/annotation-edit.d.ts.map +1 -0
- package/dist/overlays/annotation-edit.js +210 -0
- package/dist/overlays/annotation-edit.js.map +1 -0
- package/dist/overlays/annotations.d.ts +378 -0
- package/dist/overlays/annotations.d.ts.map +1 -0
- package/dist/overlays/annotations.js +947 -0
- package/dist/overlays/annotations.js.map +1 -0
- package/dist/overlays/axis-break-marks.d.ts +7 -0
- package/dist/overlays/axis-break-marks.d.ts.map +1 -0
- package/dist/overlays/axis-break-marks.js +70 -0
- package/dist/overlays/axis-break-marks.js.map +1 -0
- package/dist/overlays/chart-overlay.d.ts +113 -0
- package/dist/overlays/chart-overlay.d.ts.map +1 -0
- package/dist/overlays/chart-overlay.js +298 -0
- package/dist/overlays/chart-overlay.js.map +1 -0
- package/dist/overlays/contour-labels.d.ts +21 -0
- package/dist/overlays/contour-labels.d.ts.map +1 -0
- package/dist/overlays/contour-labels.js +172 -0
- package/dist/overlays/contour-labels.js.map +1 -0
- package/dist/overlays/crosshair-overlay.d.ts +65 -0
- package/dist/overlays/crosshair-overlay.d.ts.map +1 -0
- package/dist/overlays/crosshair-overlay.js +333 -0
- package/dist/overlays/crosshair-overlay.js.map +1 -0
- package/dist/overlays/diagnostics.d.ts +46 -0
- package/dist/overlays/diagnostics.d.ts.map +1 -0
- package/dist/overlays/diagnostics.js +124 -0
- package/dist/overlays/diagnostics.js.map +1 -0
- package/dist/overlays/drawings.d.ts +171 -0
- package/dist/overlays/drawings.d.ts.map +1 -0
- package/dist/overlays/drawings.js +823 -0
- package/dist/overlays/drawings.js.map +1 -0
- package/dist/overlays/index.d.ts +15 -0
- package/dist/overlays/index.d.ts.map +1 -0
- package/dist/overlays/index.js +15 -0
- package/dist/overlays/index.js.map +1 -0
- package/dist/overlays/legend.d.ts +72 -0
- package/dist/overlays/legend.d.ts.map +1 -0
- package/dist/overlays/legend.js +286 -0
- package/dist/overlays/legend.js.map +1 -0
- package/dist/overlays/measure-cursor.d.ts +96 -0
- package/dist/overlays/measure-cursor.d.ts.map +1 -0
- package/dist/overlays/measure-cursor.js +256 -0
- package/dist/overlays/measure-cursor.js.map +1 -0
- package/dist/overlays/overview.d.ts +52 -0
- package/dist/overlays/overview.d.ts.map +1 -0
- package/dist/overlays/overview.js +183 -0
- package/dist/overlays/overview.js.map +1 -0
- package/dist/overlays/polar-grid.d.ts +58 -0
- package/dist/overlays/polar-grid.d.ts.map +1 -0
- package/dist/overlays/polar-grid.js +131 -0
- package/dist/overlays/polar-grid.js.map +1 -0
- package/dist/overlays/progress.d.ts +37 -0
- package/dist/overlays/progress.d.ts.map +1 -0
- package/dist/overlays/progress.js +113 -0
- package/dist/overlays/progress.js.map +1 -0
- package/dist/overlays/scientific-overlays.d.ts +67 -0
- package/dist/overlays/scientific-overlays.d.ts.map +1 -0
- package/dist/overlays/scientific-overlays.js +216 -0
- package/dist/overlays/scientific-overlays.js.map +1 -0
- package/dist/overlays/selection.d.ts +66 -0
- package/dist/overlays/selection.d.ts.map +1 -0
- package/dist/overlays/selection.js +207 -0
- package/dist/overlays/selection.js.map +1 -0
- package/dist/overlays/smith-grid.d.ts +72 -0
- package/dist/overlays/smith-grid.d.ts.map +1 -0
- package/dist/overlays/smith-grid.js +231 -0
- package/dist/overlays/smith-grid.js.map +1 -0
- package/dist/overlays/value-marks.d.ts +12 -0
- package/dist/overlays/value-marks.d.ts.map +1 -0
- package/dist/overlays/value-marks.js +183 -0
- package/dist/overlays/value-marks.js.map +1 -0
- package/dist/pipeline/chart-group.d.ts +45 -0
- package/dist/pipeline/chart-group.d.ts.map +1 -0
- package/dist/pipeline/chart-group.js +153 -0
- package/dist/pipeline/chart-group.js.map +1 -0
- package/dist/pipeline/chart-series.d.ts +162 -0
- package/dist/pipeline/chart-series.d.ts.map +1 -0
- package/dist/pipeline/chart-series.js +222 -0
- package/dist/pipeline/chart-series.js.map +1 -0
- package/dist/pipeline/chart-surface-style.d.ts +25 -0
- package/dist/pipeline/chart-surface-style.d.ts.map +1 -0
- package/dist/pipeline/chart-surface-style.js +13 -0
- package/dist/pipeline/chart-surface-style.js.map +1 -0
- package/dist/pipeline/chart-surface.d.ts +240 -0
- package/dist/pipeline/chart-surface.d.ts.map +1 -0
- package/dist/pipeline/chart-surface.js +1026 -0
- package/dist/pipeline/chart-surface.js.map +1 -0
- package/dist/pipeline/csv-table.d.ts +43 -0
- package/dist/pipeline/csv-table.d.ts.map +1 -0
- package/dist/pipeline/csv-table.js +75 -0
- package/dist/pipeline/csv-table.js.map +1 -0
- package/dist/pipeline/index.d.ts +7 -0
- package/dist/pipeline/index.d.ts.map +1 -0
- package/dist/pipeline/index.js +6 -0
- package/dist/pipeline/index.js.map +1 -0
- package/dist/pipeline/value-label.d.ts +27 -0
- package/dist/pipeline/value-label.d.ts.map +1 -0
- package/dist/pipeline/value-label.js +4 -0
- package/dist/pipeline/value-label.js.map +1 -0
- package/dist/render/commands.d.ts +147 -0
- package/dist/render/commands.d.ts.map +1 -0
- package/dist/render/commands.js +17 -0
- package/dist/render/commands.js.map +1 -0
- package/dist/render/device.d.ts +73 -0
- package/dist/render/device.d.ts.map +1 -0
- package/dist/render/device.js +14 -0
- package/dist/render/device.js.map +1 -0
- package/dist/render/index.d.ts +11 -0
- package/dist/render/index.d.ts.map +1 -0
- package/dist/render/index.js +6 -0
- package/dist/render/index.js.map +1 -0
- package/dist/render/remote-device.d.ts +102 -0
- package/dist/render/remote-device.d.ts.map +1 -0
- package/dist/render/remote-device.js +572 -0
- package/dist/render/remote-device.js.map +1 -0
- package/dist/render/remote-protocol.d.ts +85 -0
- package/dist/render/remote-protocol.d.ts.map +1 -0
- package/dist/render/remote-protocol.js +34 -0
- package/dist/render/remote-protocol.js.map +1 -0
- package/dist/render/render-server.d.ts +8 -0
- package/dist/render/render-server.d.ts.map +1 -0
- package/dist/render/render-server.js +315 -0
- package/dist/render/render-server.js.map +1 -0
- package/dist/render/resources.d.ts +31 -0
- package/dist/render/resources.d.ts.map +1 -0
- package/dist/render/resources.js +2 -0
- package/dist/render/resources.js.map +1 -0
- package/dist/render/types.d.ts +110 -0
- package/dist/render/types.d.ts.map +1 -0
- package/dist/render/types.js +58 -0
- package/dist/render/types.js.map +1 -0
- package/dist/resampling/index.d.ts +7 -0
- package/dist/resampling/index.d.ts.map +1 -0
- package/dist/resampling/index.js +7 -0
- package/dist/resampling/index.js.map +1 -0
- package/dist/resampling/lod-pyramid.d.ts +44 -0
- package/dist/resampling/lod-pyramid.d.ts.map +1 -0
- package/dist/resampling/lod-pyramid.js +162 -0
- package/dist/resampling/lod-pyramid.js.map +1 -0
- package/dist/resampling/lttb.d.ts +8 -0
- package/dist/resampling/lttb.d.ts.map +1 -0
- package/dist/resampling/lttb.js +92 -0
- package/dist/resampling/lttb.js.map +1 -0
- package/dist/resampling/min-max-decimator.d.ts +19 -0
- package/dist/resampling/min-max-decimator.d.ts.map +1 -0
- package/dist/resampling/min-max-decimator.js +78 -0
- package/dist/resampling/min-max-decimator.js.map +1 -0
- package/dist/resampling/min-max.d.ts +15 -0
- package/dist/resampling/min-max.d.ts.map +1 -0
- package/dist/resampling/min-max.js +35 -0
- package/dist/resampling/min-max.js.map +1 -0
- package/dist/resampling/pyramid-worker-entry.d.ts +2 -0
- package/dist/resampling/pyramid-worker-entry.d.ts.map +1 -0
- package/dist/resampling/pyramid-worker-entry.js +5 -0
- package/dist/resampling/pyramid-worker-entry.js.map +1 -0
- package/dist/resampling/pyramid-worker.d.ts +49 -0
- package/dist/resampling/pyramid-worker.d.ts.map +1 -0
- package/dist/resampling/pyramid-worker.js +47 -0
- package/dist/resampling/pyramid-worker.js.map +1 -0
- package/dist/resampling/series-resampler.d.ts +80 -0
- package/dist/resampling/series-resampler.d.ts.map +1 -0
- package/dist/resampling/series-resampler.js +211 -0
- package/dist/resampling/series-resampler.js.map +1 -0
- package/dist/series/bar-series.d.ts +103 -0
- package/dist/series/bar-series.d.ts.map +1 -0
- package/dist/series/bar-series.js +510 -0
- package/dist/series/bar-series.js.map +1 -0
- package/dist/series/candle-series.d.ts +232 -0
- package/dist/series/candle-series.d.ts.map +1 -0
- package/dist/series/candle-series.js +624 -0
- package/dist/series/candle-series.js.map +1 -0
- package/dist/series/colormap.d.ts +29 -0
- package/dist/series/colormap.d.ts.map +1 -0
- package/dist/series/colormap.js +59 -0
- package/dist/series/colormap.js.map +1 -0
- package/dist/series/contour-series.d.ts +111 -0
- package/dist/series/contour-series.d.ts.map +1 -0
- package/dist/series/contour-series.js +319 -0
- package/dist/series/contour-series.js.map +1 -0
- package/dist/series/dash-expander.d.ts +5 -0
- package/dist/series/dash-expander.d.ts.map +1 -0
- package/dist/series/dash-expander.js +100 -0
- package/dist/series/dash-expander.js.map +1 -0
- package/dist/series/density-raster.d.ts +31 -0
- package/dist/series/density-raster.d.ts.map +1 -0
- package/dist/series/density-raster.js +118 -0
- package/dist/series/density-raster.js.map +1 -0
- package/dist/series/digital-series.d.ts +64 -0
- package/dist/series/digital-series.d.ts.map +1 -0
- package/dist/series/digital-series.js +211 -0
- package/dist/series/digital-series.js.map +1 -0
- package/dist/series/gantt-series.d.ts +181 -0
- package/dist/series/gantt-series.d.ts.map +1 -0
- package/dist/series/gantt-series.js +646 -0
- package/dist/series/gantt-series.js.map +1 -0
- package/dist/series/heatmap-series.d.ts +144 -0
- package/dist/series/heatmap-series.d.ts.map +1 -0
- package/dist/series/heatmap-series.js +426 -0
- package/dist/series/heatmap-series.js.map +1 -0
- package/dist/series/index.d.ts +23 -0
- package/dist/series/index.d.ts.map +1 -0
- package/dist/series/index.js +23 -0
- package/dist/series/index.js.map +1 -0
- package/dist/series/line-series.d.ts +132 -0
- package/dist/series/line-series.d.ts.map +1 -0
- package/dist/series/line-series.js +431 -0
- package/dist/series/line-series.js.map +1 -0
- package/dist/series/measurement-series.d.ts +117 -0
- package/dist/series/measurement-series.d.ts.map +1 -0
- package/dist/series/measurement-series.js +310 -0
- package/dist/series/measurement-series.js.map +1 -0
- package/dist/series/pie-series.d.ts +143 -0
- package/dist/series/pie-series.d.ts.map +1 -0
- package/dist/series/pie-series.js +521 -0
- package/dist/series/pie-series.js.map +1 -0
- package/dist/series/pixel-line.d.ts +48 -0
- package/dist/series/pixel-line.d.ts.map +1 -0
- package/dist/series/pixel-line.js +121 -0
- package/dist/series/pixel-line.js.map +1 -0
- package/dist/series/polar-series.d.ts +112 -0
- package/dist/series/polar-series.d.ts.map +1 -0
- package/dist/series/polar-series.js +269 -0
- package/dist/series/polar-series.js.map +1 -0
- package/dist/series/polygon-series.d.ts +69 -0
- package/dist/series/polygon-series.d.ts.map +1 -0
- package/dist/series/polygon-series.js +231 -0
- package/dist/series/polygon-series.js.map +1 -0
- package/dist/series/raster-series.d.ts +75 -0
- package/dist/series/raster-series.d.ts.map +1 -0
- package/dist/series/raster-series.js +189 -0
- package/dist/series/raster-series.js.map +1 -0
- package/dist/series/ribbon-series.d.ts +205 -0
- package/dist/series/ribbon-series.d.ts.map +1 -0
- package/dist/series/ribbon-series.js +527 -0
- package/dist/series/ribbon-series.js.map +1 -0
- package/dist/series/sample-series.d.ts +64 -0
- package/dist/series/sample-series.d.ts.map +1 -0
- package/dist/series/sample-series.js +214 -0
- package/dist/series/sample-series.js.map +1 -0
- package/dist/series/scatter-series.d.ts +125 -0
- package/dist/series/scatter-series.d.ts.map +1 -0
- package/dist/series/scatter-series.js +367 -0
- package/dist/series/scatter-series.js.map +1 -0
- package/dist/series/scientific-series.d.ts +138 -0
- package/dist/series/scientific-series.d.ts.map +1 -0
- package/dist/series/scientific-series.js +361 -0
- package/dist/series/scientific-series.js.map +1 -0
- package/dist/series/smith-series.d.ts +106 -0
- package/dist/series/smith-series.d.ts.map +1 -0
- package/dist/series/smith-series.js +216 -0
- package/dist/series/smith-series.js.map +1 -0
- package/dist/series/spectrogram-series.d.ts +115 -0
- package/dist/series/spectrogram-series.d.ts.map +1 -0
- package/dist/series/spectrogram-series.js +287 -0
- package/dist/series/spectrogram-series.js.map +1 -0
- package/dist/series/sweep-series.d.ts +127 -0
- package/dist/series/sweep-series.d.ts.map +1 -0
- package/dist/series/sweep-series.js +347 -0
- package/dist/series/sweep-series.js.map +1 -0
- package/dist/series/vertices.d.ts +27 -0
- package/dist/series/vertices.d.ts.map +1 -0
- package/dist/series/vertices.js +120 -0
- package/dist/series/vertices.js.map +1 -0
- package/dist/series/volume-profile-series.d.ts +140 -0
- package/dist/series/volume-profile-series.d.ts.map +1 -0
- package/dist/series/volume-profile-series.js +371 -0
- package/dist/series/volume-profile-series.js.map +1 -0
- package/dist/text/engine.d.ts +91 -0
- package/dist/text/engine.d.ts.map +1 -0
- package/dist/text/engine.js +327 -0
- package/dist/text/engine.js.map +1 -0
- package/dist/text/font.d.ts +49 -0
- package/dist/text/font.d.ts.map +1 -0
- package/dist/text/font.js +259 -0
- package/dist/text/font.js.map +1 -0
- package/dist/text/index.d.ts +2 -0
- package/dist/text/index.d.ts.map +1 -0
- package/dist/text/index.js +2 -0
- package/dist/text/index.js.map +1 -0
- package/dist/text/msdf.d.ts +7 -0
- package/dist/text/msdf.d.ts.map +1 -0
- package/dist/text/msdf.js +182 -0
- package/dist/text/msdf.js.map +1 -0
- package/dist/text/outlines.d.ts +29 -0
- package/dist/text/outlines.d.ts.map +1 -0
- package/dist/text/outlines.js +250 -0
- package/dist/text/outlines.js.map +1 -0
- package/dist/text/shaper.d.ts +52 -0
- package/dist/text/shaper.d.ts.map +1 -0
- package/dist/text/shaper.js +573 -0
- package/dist/text/shaper.js.map +1 -0
- package/dist/themes/index.d.ts +2 -0
- package/dist/themes/index.d.ts.map +1 -0
- package/dist/themes/index.js +2 -0
- package/dist/themes/index.js.map +1 -0
- package/dist/themes/theme-document.d.ts +97 -0
- package/dist/themes/theme-document.d.ts.map +1 -0
- package/dist/themes/theme-document.js +4 -0
- package/dist/themes/theme-document.js.map +1 -0
- package/dist/themes/theme.d.ts +32 -0
- package/dist/themes/theme.d.ts.map +1 -0
- package/dist/themes/theme.js +125 -0
- package/dist/themes/theme.js.map +1 -0
- package/package.json +39 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
202
|
+
|
package/README.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @tachyon-charts/core
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Charts, axes, data, interaction, layout and themes; the rendering interface.
|
|
4
|
+
|
|
5
|
+
Part of **Tachyon Charts for JavaScript**: GPU-accelerated charts for the web, drawn with WebGPU, WebGL 2 or Canvas 2D.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @tachyon-charts/core
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Pictures, examples and the guide: [github.com/MotoNero/tachyon_charts_js](https://github.com/MotoNero/tachyon_charts_js#readme). License: Apache-2.0.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { DoubleRange } from '../numerics/range.js';
|
|
2
|
+
import type { AxisScaling } from '../numerics/scaling.js';
|
|
3
|
+
import { LinearAxisTransform } from '../numerics/transform.js';
|
|
4
|
+
/** The side of the plot area an axis sits on. */
|
|
5
|
+
export type AxisPosition = 'left' | 'right' | 'top' | 'bottom';
|
|
6
|
+
/** Measures labels; the text engine of the chart implements it. */
|
|
7
|
+
export interface TextMeasurer {
|
|
8
|
+
/** The height of a line in device-independent units. */
|
|
9
|
+
readonly lineHeight: number;
|
|
10
|
+
/** The width of a text in device-independent units. */
|
|
11
|
+
measureWidth(text: string): number;
|
|
12
|
+
}
|
|
13
|
+
/** A labeled tick. */
|
|
14
|
+
export interface AxisTick {
|
|
15
|
+
/** The value of the tick on the axis. */
|
|
16
|
+
readonly value: number;
|
|
17
|
+
/** The text beside the tick. */
|
|
18
|
+
readonly label: string;
|
|
19
|
+
}
|
|
20
|
+
/** The ticks of an axis for a visible range. */
|
|
21
|
+
export interface TickSet {
|
|
22
|
+
/** The labeled ticks, from the start of the range. */
|
|
23
|
+
readonly major: readonly AxisTick[];
|
|
24
|
+
/** The values of the unlabeled ticks between them. */
|
|
25
|
+
readonly minor: readonly number[];
|
|
26
|
+
/** The distance of the major ticks in the unit of the axis; 0 for a single tick. */
|
|
27
|
+
readonly step: number;
|
|
28
|
+
}
|
|
29
|
+
/** A set without ticks. */
|
|
30
|
+
export declare const emptyTicks: TickSet;
|
|
31
|
+
/** An axis. It belongs to the thread that owns the chart. */
|
|
32
|
+
export declare abstract class Axis {
|
|
33
|
+
/** The identifier series refer to. */
|
|
34
|
+
readonly id: string;
|
|
35
|
+
/** The side of the plot area. */
|
|
36
|
+
readonly position: AxisPosition;
|
|
37
|
+
private range;
|
|
38
|
+
private limitRange;
|
|
39
|
+
private inverted;
|
|
40
|
+
private autoRange;
|
|
41
|
+
private titleText;
|
|
42
|
+
private crossing;
|
|
43
|
+
private changes;
|
|
44
|
+
/** Whether the axis takes no room and draws nothing, as in polar charts, which use only its range. */
|
|
45
|
+
isHidden: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* @param id - The identifier series refer to.
|
|
48
|
+
* @param position - The side of the plot area.
|
|
49
|
+
*/
|
|
50
|
+
protected constructor(
|
|
51
|
+
/** The identifier series refer to. */
|
|
52
|
+
id: string,
|
|
53
|
+
/** The side of the plot area. */
|
|
54
|
+
position: AxisPosition);
|
|
55
|
+
/** Grows with every change, to detect outdated layouts. */
|
|
56
|
+
get version(): number;
|
|
57
|
+
/** Whether the axis lies at the top or bottom. */
|
|
58
|
+
get isHorizontal(): boolean;
|
|
59
|
+
/** The title beside the labels. */
|
|
60
|
+
get title(): string | undefined;
|
|
61
|
+
set title(value: string | undefined);
|
|
62
|
+
/**
|
|
63
|
+
* The visible range. Setting it ends the automatic range and keeps it inside the limits: a range that reaches out
|
|
64
|
+
* moves back, a longer one is cut.
|
|
65
|
+
*/
|
|
66
|
+
get visibleRange(): DoubleRange;
|
|
67
|
+
set visibleRange(value: DoubleRange);
|
|
68
|
+
/** The bounds of zooming and panning. */
|
|
69
|
+
get limits(): DoubleRange | undefined;
|
|
70
|
+
set limits(value: DoubleRange | undefined);
|
|
71
|
+
/** Whether the range follows the data through {@link Axis.fitTo}. */
|
|
72
|
+
get isAutoRange(): boolean;
|
|
73
|
+
set isAutoRange(value: boolean);
|
|
74
|
+
/** Whether the axis runs against its usual direction. */
|
|
75
|
+
get isInverted(): boolean;
|
|
76
|
+
set isInverted(value: boolean);
|
|
77
|
+
/**
|
|
78
|
+
* The value of the other axis where this one runs through the plot, such as 0 for axes crossing in the origin;
|
|
79
|
+
* `undefined` keeps it at the edge.
|
|
80
|
+
*/
|
|
81
|
+
get crossesAt(): number | undefined;
|
|
82
|
+
set crossesAt(value: number | undefined);
|
|
83
|
+
/** The rotation of the labels in degrees; only axes with free text support it. */
|
|
84
|
+
get labelRotation(): number;
|
|
85
|
+
set labelRotation(value: number);
|
|
86
|
+
/** The height the labels of a horizontal axis take up. */
|
|
87
|
+
measureLabelHeight(measurer: TextMeasurer): number;
|
|
88
|
+
/** The width of a band between the plot and the ticks, such as a color bar. */
|
|
89
|
+
get bandThickness(): number;
|
|
90
|
+
/** The nonlinear scale of the axis, `undefined` for a linear one. */
|
|
91
|
+
get scaling(): AxisScaling | undefined;
|
|
92
|
+
/** Applies the range of the data while the range is automatic. Empty data leaves the range alone. */
|
|
93
|
+
fitTo(data: DoubleRange, padding?: number): void;
|
|
94
|
+
/** The mapping to pixels. Vertical axes grow upwards, against the pixels. */
|
|
95
|
+
createTransform(start: number, length: number): LinearAxisTransform;
|
|
96
|
+
/** Scales the visible range around a value, which keeps its place. Limits still apply. */
|
|
97
|
+
zoomAround(anchor: number, factor: number): void;
|
|
98
|
+
/** Moves the visible range without changing its length. Limits still apply. */
|
|
99
|
+
panBy(delta: number): void;
|
|
100
|
+
/** Shows a range given by its ends in any order, unless it cannot be told apart in doubles or is not finite. */
|
|
101
|
+
showRange(first: number, second: number): void;
|
|
102
|
+
/** A value for a cursor, with more precision than a tick label needs. */
|
|
103
|
+
formatCursorValue(value: number): string;
|
|
104
|
+
/** The ticks for the visible range at a length in device-independent units. */
|
|
105
|
+
abstract generateTicks(length: number, measurer: TextMeasurer): TickSet;
|
|
106
|
+
/** Brings a range into the domain of the axis. */
|
|
107
|
+
protected normalizeRange(range: DoubleRange): DoubleRange;
|
|
108
|
+
/** Marks the axis as changed. */
|
|
109
|
+
protected changed(): void;
|
|
110
|
+
/** Sets the range as the axis would, for derived axes that set it on their own. */
|
|
111
|
+
protected setRange(range: DoubleRange): void;
|
|
112
|
+
private static pad;
|
|
113
|
+
private padScaled;
|
|
114
|
+
private applyRange;
|
|
115
|
+
private static constrain;
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=axis.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"axis.d.ts","sourceRoot":"","sources":["../../src/axes/axis.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAI5D,iDAAiD;AACjD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE/D,mEAAmE;AACnE,MAAM,WAAW,YAAY;IAC3B,wDAAwD;IACxD,QAAQ,CA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CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAW9C,yEAAyE;IACzE,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAIxC,+EAA+E;IAC/E,QAAQ,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,GAAG,OAAO;IAEvE,kDAAkD;IAClD,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,WAAW,GAAG,WAAW;IAIzD,iCAAiC;IACjC,SAAS,CAAC,OAAO,IAAI,IAAI;IAIzB,mFAAmF;IACnF,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAK5C,OAAO,CAAC,MAAM,CAAC,GAAG;IAUlB,OAAO,CAAC,SAAS;IAUjB,OAAO,CAAC,UAAU;IAclB,OAAO,CAAC,MAAM,CAAC,SAAS;CASzB"}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
// What all axes share: placement, visible range and its limits (AxisBase of the .NET version).
|
|
2
|
+
import { DoubleRange } from '../numerics/range.js';
|
|
3
|
+
import { LinearAxisTransform } from '../numerics/transform.js';
|
|
4
|
+
import { formatGeneral } from '../locale/format.js';
|
|
5
|
+
import { invariantCulture } from '../locale/culture.js';
|
|
6
|
+
/** A set without ticks. */
|
|
7
|
+
export const emptyTicks = { major: [], minor: [], step: 0 };
|
|
8
|
+
const minimumRelativeLength = 1e-13;
|
|
9
|
+
const singleValueMargin = 0.1;
|
|
10
|
+
/** An axis. It belongs to the thread that owns the chart. */
|
|
11
|
+
export class Axis {
|
|
12
|
+
id;
|
|
13
|
+
position;
|
|
14
|
+
range = new DoubleRange(0, 1);
|
|
15
|
+
limitRange;
|
|
16
|
+
inverted = false;
|
|
17
|
+
autoRange = true;
|
|
18
|
+
titleText;
|
|
19
|
+
crossing;
|
|
20
|
+
changes = 0;
|
|
21
|
+
/** Whether the axis takes no room and draws nothing, as in polar charts, which use only its range. */
|
|
22
|
+
isHidden = false;
|
|
23
|
+
/**
|
|
24
|
+
* @param id - The identifier series refer to.
|
|
25
|
+
* @param position - The side of the plot area.
|
|
26
|
+
*/
|
|
27
|
+
constructor(
|
|
28
|
+
/** The identifier series refer to. */
|
|
29
|
+
id,
|
|
30
|
+
/** The side of the plot area. */
|
|
31
|
+
position) {
|
|
32
|
+
this.id = id;
|
|
33
|
+
this.position = position;
|
|
34
|
+
if (typeof id !== 'string' || id === '') {
|
|
35
|
+
throw new RangeError('An axis needs an identifier.');
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/** Grows with every change, to detect outdated layouts. */
|
|
39
|
+
get version() {
|
|
40
|
+
return this.changes;
|
|
41
|
+
}
|
|
42
|
+
/** Whether the axis lies at the top or bottom. */
|
|
43
|
+
get isHorizontal() {
|
|
44
|
+
return this.position === 'top' || this.position === 'bottom';
|
|
45
|
+
}
|
|
46
|
+
/** The title beside the labels. */
|
|
47
|
+
get title() {
|
|
48
|
+
return this.titleText;
|
|
49
|
+
}
|
|
50
|
+
set title(value) {
|
|
51
|
+
if (value !== this.titleText) {
|
|
52
|
+
this.titleText = value;
|
|
53
|
+
this.changes++;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The visible range. Setting it ends the automatic range and keeps it inside the limits: a range that reaches out
|
|
58
|
+
* moves back, a longer one is cut.
|
|
59
|
+
*/
|
|
60
|
+
get visibleRange() {
|
|
61
|
+
return this.range;
|
|
62
|
+
}
|
|
63
|
+
set visibleRange(value) {
|
|
64
|
+
this.isAutoRange = false;
|
|
65
|
+
this.applyRange(value);
|
|
66
|
+
}
|
|
67
|
+
/** The bounds of zooming and panning. */
|
|
68
|
+
get limits() {
|
|
69
|
+
return this.limitRange;
|
|
70
|
+
}
|
|
71
|
+
set limits(value) {
|
|
72
|
+
if (value?.isEmpty) {
|
|
73
|
+
throw new RangeError('The limits must not be empty.');
|
|
74
|
+
}
|
|
75
|
+
this.limitRange = value;
|
|
76
|
+
this.changes++;
|
|
77
|
+
this.applyRange(this.range);
|
|
78
|
+
}
|
|
79
|
+
/** Whether the range follows the data through {@link Axis.fitTo}. */
|
|
80
|
+
get isAutoRange() {
|
|
81
|
+
return this.autoRange;
|
|
82
|
+
}
|
|
83
|
+
set isAutoRange(value) {
|
|
84
|
+
if (value !== this.autoRange) {
|
|
85
|
+
this.autoRange = value;
|
|
86
|
+
this.changes++;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/** Whether the axis runs against its usual direction. */
|
|
90
|
+
get isInverted() {
|
|
91
|
+
return this.inverted;
|
|
92
|
+
}
|
|
93
|
+
set isInverted(value) {
|
|
94
|
+
if (value !== this.inverted) {
|
|
95
|
+
this.inverted = value;
|
|
96
|
+
this.changes++;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* The value of the other axis where this one runs through the plot, such as 0 for axes crossing in the origin;
|
|
101
|
+
* `undefined` keeps it at the edge.
|
|
102
|
+
*/
|
|
103
|
+
get crossesAt() {
|
|
104
|
+
return this.crossing;
|
|
105
|
+
}
|
|
106
|
+
set crossesAt(value) {
|
|
107
|
+
if (value !== undefined && !Number.isFinite(value)) {
|
|
108
|
+
throw new RangeError('The place must be finite.');
|
|
109
|
+
}
|
|
110
|
+
this.crossing = value;
|
|
111
|
+
this.changes++;
|
|
112
|
+
}
|
|
113
|
+
/** The rotation of the labels in degrees; only axes with free text support it. */
|
|
114
|
+
get labelRotation() {
|
|
115
|
+
return 0;
|
|
116
|
+
}
|
|
117
|
+
set labelRotation(value) {
|
|
118
|
+
throw new Error(`This axis has no rotated labels (${String(value)}).`);
|
|
119
|
+
}
|
|
120
|
+
/** The height the labels of a horizontal axis take up. */
|
|
121
|
+
measureLabelHeight(measurer) {
|
|
122
|
+
return measurer.lineHeight;
|
|
123
|
+
}
|
|
124
|
+
/** The width of a band between the plot and the ticks, such as a color bar. */
|
|
125
|
+
// A getter, not a field: the color axis overrides it with its own width.
|
|
126
|
+
// eslint-disable-next-line @typescript-eslint/class-literal-property-style
|
|
127
|
+
get bandThickness() {
|
|
128
|
+
return 0;
|
|
129
|
+
}
|
|
130
|
+
/** The nonlinear scale of the axis, `undefined` for a linear one. */
|
|
131
|
+
get scaling() {
|
|
132
|
+
return undefined;
|
|
133
|
+
}
|
|
134
|
+
/** Applies the range of the data while the range is automatic. Empty data leaves the range alone. */
|
|
135
|
+
fitTo(data, padding = 0.05) {
|
|
136
|
+
if (!Number.isFinite(padding) || padding < 0) {
|
|
137
|
+
throw new RangeError(`The padding must not be negative, not ${String(padding)}.`);
|
|
138
|
+
}
|
|
139
|
+
if (this.autoRange && !data.isEmpty) {
|
|
140
|
+
this.applyRange(this.padScaled(data, padding));
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
/** The mapping to pixels. Vertical axes grow upwards, against the pixels. */
|
|
144
|
+
createTransform(start, length) {
|
|
145
|
+
if (!(length >= 0)) {
|
|
146
|
+
throw new RangeError(`The length must not be negative, not ${String(length)}.`);
|
|
147
|
+
}
|
|
148
|
+
const end = start + length;
|
|
149
|
+
return this.isHorizontal !== this.inverted
|
|
150
|
+
? new LinearAxisTransform(this.range, start, end, this.scaling)
|
|
151
|
+
: new LinearAxisTransform(this.range, end, start, this.scaling);
|
|
152
|
+
}
|
|
153
|
+
/** Scales the visible range around a value, which keeps its place. Limits still apply. */
|
|
154
|
+
zoomAround(anchor, factor) {
|
|
155
|
+
if (!Number.isFinite(factor) || factor <= 0) {
|
|
156
|
+
throw new RangeError(`The factor must be positive and finite, not ${String(factor)}.`);
|
|
157
|
+
}
|
|
158
|
+
const scaling = this.scaling;
|
|
159
|
+
const center = scaling ? scaling.forward(anchor) : anchor;
|
|
160
|
+
const min = scaling ? scaling.forward(this.range.min) : this.range.min;
|
|
161
|
+
const max = scaling ? scaling.forward(this.range.max) : this.range.max;
|
|
162
|
+
const first = center - (center - min) * factor;
|
|
163
|
+
const second = center + (max - center) * factor;
|
|
164
|
+
this.showRange(scaling ? scaling.inverse(first) : first, scaling ? scaling.inverse(second) : second);
|
|
165
|
+
}
|
|
166
|
+
/** Moves the visible range without changing its length. Limits still apply. */
|
|
167
|
+
panBy(delta) {
|
|
168
|
+
this.showRange(this.range.min + delta, this.range.max + delta);
|
|
169
|
+
}
|
|
170
|
+
/** Shows a range given by its ends in any order, unless it cannot be told apart in doubles or is not finite. */
|
|
171
|
+
showRange(first, second) {
|
|
172
|
+
if (!Number.isFinite(first) || !Number.isFinite(second)) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
const range = DoubleRange.fromUnordered(first, second);
|
|
176
|
+
const magnitude = Math.max(Math.abs(range.min), Math.abs(range.max));
|
|
177
|
+
if (Number.isFinite(range.length) && range.length > magnitude * minimumRelativeLength) {
|
|
178
|
+
this.visibleRange = range;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
/** A value for a cursor, with more precision than a tick label needs. */
|
|
182
|
+
formatCursorValue(value) {
|
|
183
|
+
return formatGeneral(value, 6, invariantCulture);
|
|
184
|
+
}
|
|
185
|
+
/** Brings a range into the domain of the axis. */
|
|
186
|
+
normalizeRange(range) {
|
|
187
|
+
return range;
|
|
188
|
+
}
|
|
189
|
+
/** Marks the axis as changed. */
|
|
190
|
+
changed() {
|
|
191
|
+
this.changes++;
|
|
192
|
+
}
|
|
193
|
+
/** Sets the range as the axis would, for derived axes that set it on their own. */
|
|
194
|
+
setRange(range) {
|
|
195
|
+
this.isAutoRange = false;
|
|
196
|
+
this.applyRange(range);
|
|
197
|
+
}
|
|
198
|
+
static pad(data, padding) {
|
|
199
|
+
// A single value has no length to scale; it gets a margin of its own size.
|
|
200
|
+
const ownSize = data.min !== 0 ? Math.abs(data.min) * singleValueMargin : 1;
|
|
201
|
+
const margin = data.length > 0 ? data.length * padding : ownSize;
|
|
202
|
+
const min = data.min - margin;
|
|
203
|
+
const max = data.max + margin;
|
|
204
|
+
return Number.isFinite(min) && Number.isFinite(max) ? new DoubleRange(min, max) : data;
|
|
205
|
+
}
|
|
206
|
+
// On a nonlinear axis, padding is the same distance on the screen at both ends.
|
|
207
|
+
padScaled(data, padding) {
|
|
208
|
+
const scaling = this.scaling;
|
|
209
|
+
if (!scaling) {
|
|
210
|
+
return Axis.pad(data, padding);
|
|
211
|
+
}
|
|
212
|
+
const valid = this.normalizeRange(data);
|
|
213
|
+
const padded = Axis.pad(new DoubleRange(scaling.forward(valid.min), scaling.forward(valid.max)), padding);
|
|
214
|
+
return new DoubleRange(scaling.inverse(padded.min), scaling.inverse(padded.max));
|
|
215
|
+
}
|
|
216
|
+
applyRange(value) {
|
|
217
|
+
if (value.isEmpty) {
|
|
218
|
+
throw new RangeError('The visible range must not be empty.');
|
|
219
|
+
}
|
|
220
|
+
let range = this.normalizeRange(value);
|
|
221
|
+
if (this.limitRange) {
|
|
222
|
+
range = Axis.constrain(range, this.limitRange);
|
|
223
|
+
}
|
|
224
|
+
if (!range.equals(this.range)) {
|
|
225
|
+
this.range = range;
|
|
226
|
+
this.changes++;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
static constrain(range, limits) {
|
|
230
|
+
if (range.length >= limits.length) {
|
|
231
|
+
return limits;
|
|
232
|
+
}
|
|
233
|
+
if (range.min < limits.min) {
|
|
234
|
+
return new DoubleRange(limits.min, limits.min + range.length);
|
|
235
|
+
}
|
|
236
|
+
return range.max > limits.max ? new DoubleRange(limits.max - range.length, limits.max) : range;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
//# sourceMappingURL=axis.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"axis.js","sourceRoot":"","sources":["../../src/axes/axis.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAA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W,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;QAChE,CAAC;QACD,OAAO,KAAK,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACjG,CAAC;CACF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Axis, type AxisPosition, type TextMeasurer, type TickSet } from './axis.js';
|
|
2
|
+
/** An axis with named places. Without room for all names it shows every n-th one. */
|
|
3
|
+
export declare class CategoryAxis extends Axis {
|
|
4
|
+
private names;
|
|
5
|
+
private rotation;
|
|
6
|
+
constructor(id: string, position: AxisPosition, categories: readonly string[]);
|
|
7
|
+
/** The names of the places 0, 1, 2 and so on; setting them shows all. */
|
|
8
|
+
get categories(): readonly string[];
|
|
9
|
+
set categories(value: readonly string[]);
|
|
10
|
+
/**
|
|
11
|
+
* The rotation of the labels in degrees, up to 90 in both directions. Negative angles lift the end of the text, and
|
|
12
|
+
* rotated labels end at their tick.
|
|
13
|
+
*/
|
|
14
|
+
get labelRotation(): number;
|
|
15
|
+
set labelRotation(value: number);
|
|
16
|
+
/** {@inheritDoc Axis.measureLabelHeight} */
|
|
17
|
+
measureLabelHeight(measurer: TextMeasurer): number;
|
|
18
|
+
/** {@inheritDoc Axis.generateTicks} */
|
|
19
|
+
generateTicks(length: number, measurer: TextMeasurer): TickSet;
|
|
20
|
+
private longest;
|
|
21
|
+
private neededSpace;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=category-axis.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"category-axis.d.ts","sourceRoot":"","sources":["../../src/axes/category-axis.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAc,KAAK,YAAY,EAAiB,KAAK,YAAY,EAAE,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AAK7G,qFAAqF;AACrF,qBAAa,YAAa,SAAQ,IAAI;IACpC,OAAO,CAAC,KAAK,CAAyB;IACtC,OAAO,CAAC,QAAQ,CAAK;gBAET,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,MAAM,EAAE;IAK7E,yEAAyE;IACzE,IAAI,UAAU,IAAI,SAAS,MAAM,EAAE,CAElC;IAED,IAAI,UAAU,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,EAMtC;IAED;;;OAGG;IACH,IAAa,aAAa,IAAI,MAAM,CAEnC;IAED,IAAa,aAAa,CAAC,KAAK,EAAE,MAAM,EAMvC;IAED,4CAA4C;IACnC,kBAAkB,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM;IAK3D,uCAAuC;IACvC,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,GAAG,OAAO;IAiB9D,OAAO,CAAC,OAAO;IAQf,OAAO,CAAC,WAAW;CASpB"}
|