velo-plot 3.0.0 → 4.0.0-alpha.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/README.md +22 -15
- package/dist/ChartCore-KYG2HTcK.js +7474 -0
- package/dist/ChartCore-KYG2HTcK.js.map +1 -0
- package/dist/GpuChartRenderer-Dxc0hrQA.js +75 -0
- package/dist/GpuChartRenderer-Dxc0hrQA.js.map +1 -0
- package/dist/{index.core-BmZe2jRQ.js → PluginRegistry-CDf_jcnp.js} +19 -33
- package/dist/PluginRegistry-CDf_jcnp.js.map +1 -0
- package/dist/SVGDocumentBuilder-C-uLkcFW.js +83 -0
- package/dist/SVGDocumentBuilder-C-uLkcFW.js.map +1 -0
- package/dist/angular-hooks.js +1 -1
- package/dist/angular.js +8 -8
- package/dist/{axisFormat-CzumxpCL.js → axisFormat-Sz4WIJfQ.js} +2 -2
- package/dist/{axisFormat-CzumxpCL.js.map → axisFormat-Sz4WIJfQ.js.map} +1 -1
- package/dist/{chartSyncBridge-DbWrwtyP.js → chartSyncBridge-C1uRy0ZS.js} +12 -11
- package/dist/{chartSyncBridge-DbWrwtyP.js.map → chartSyncBridge-C1uRy0ZS.js.map} +1 -1
- package/dist/core/ChartStatistics.d.ts +1 -1
- package/dist/core/chart/ChartCore.d.ts +19 -20
- package/dist/core/chart/ChartFeatureHooks.d.ts +7 -0
- package/dist/core/chart/ChartRenderLoop.d.ts +5 -0
- package/dist/core/chart/ChartRenderer.d.ts +9 -0
- package/dist/core/chart/ChartSetup.d.ts +1 -0
- package/dist/core/chart/chartExportPatch.d.ts +2 -0
- package/dist/core/chart/exporter/SVGExporter.d.ts +9 -7
- package/dist/core/chart/exporter/svg/SVGDocumentBuilder.d.ts +27 -0
- package/dist/core/chart/exporter/svg/SVGExportContext.d.ts +147 -0
- package/dist/core/chart/exporter/svg/SVGOrchestrator.d.ts +3 -0
- package/dist/core/chart/exporter/svg/SVGThemeAdapter.d.ts +22 -0
- package/dist/core/chart/exporter/svg/__tests__/testFixtures.d.ts +46 -0
- package/dist/core/chart/exporter/svg/__tests__/visualTestUtils.d.ts +12 -0
- package/dist/core/chart/exporter/svg/overlay/axes.d.ts +4 -0
- package/dist/core/chart/exporter/svg/overlay/border.d.ts +4 -0
- package/dist/core/chart/exporter/svg/overlay/errorBars.d.ts +7 -0
- package/dist/core/chart/exporter/svg/overlay/grid.d.ts +4 -0
- package/dist/core/chart/exporter/svg/overlay/index.d.ts +12 -0
- package/dist/core/chart/exporter/svg/overlay/legend.d.ts +4 -0
- package/dist/core/chart/exporter/svg/overlay/pluginCharts.d.ts +6 -0
- package/dist/core/chart/exporter/svg/overlay/polarGrid.d.ts +4 -0
- package/dist/core/chart/exporter/svg/overlay/specialChart.d.ts +15 -0
- package/dist/core/chart/exporter/svg/overlay/title.d.ts +4 -0
- package/dist/core/chart/exporter/svg/plugins/annotations.d.ts +5 -0
- package/dist/core/chart/exporter/svg/plugins/brokenAxis.d.ts +20 -0
- package/dist/core/chart/exporter/svg/plugins/latex.d.ts +9 -0
- package/dist/core/chart/exporter/svg/plugins/register.d.ts +8 -0
- package/dist/core/chart/exporter/svg/plugins/regression.d.ts +33 -0
- package/dist/core/chart/exporter/svg/plugins/roi.d.ts +12 -0
- package/dist/core/chart/exporter/svg/plugins/tradeMarkers.d.ts +3 -0
- package/dist/core/chart/exporter/svg/plugins/types.d.ts +28 -0
- package/dist/core/chart/exporter/svg/plugins/watermark.d.ts +13 -0
- package/dist/core/chart/exporter/svg/series/band.d.ts +6 -0
- package/dist/core/chart/exporter/svg/series/bar.d.ts +6 -0
- package/dist/core/chart/exporter/svg/series/boxplot.d.ts +6 -0
- package/dist/core/chart/exporter/svg/series/candlestick.d.ts +6 -0
- package/dist/core/chart/exporter/svg/series/finitePoints.d.ts +6 -0
- package/dist/core/chart/exporter/svg/series/gauge.d.ts +5 -0
- package/dist/core/chart/exporter/svg/series/heatmap.d.ts +6 -0
- package/dist/core/chart/exporter/svg/series/indicator.d.ts +6 -0
- package/dist/core/chart/exporter/svg/series/line.d.ts +12 -0
- package/dist/core/chart/exporter/svg/series/polar.d.ts +6 -0
- package/dist/core/chart/exporter/svg/series/radar.d.ts +5 -0
- package/dist/core/chart/exporter/svg/series/registry.d.ts +10 -0
- package/dist/core/chart/exporter/svg/series/sankey.d.ts +5 -0
- package/dist/core/chart/exporter/svg/series/scatter.d.ts +1 -0
- package/dist/core/chart/exporter/svg/series/ternary.d.ts +7 -0
- package/dist/core/chart/exporter/svg/series/waterfall.d.ts +6 -0
- package/dist/core/chart/exporter/svg/seriesAtTimestamp.d.ts +4 -0
- package/dist/core/chart/exporter/svg/seriesUtils.d.ts +3 -0
- package/dist/core/chart/exporter/svg/symbols.d.ts +5 -0
- package/dist/core/chart/exporter/svg/tickUtils.d.ts +9 -0
- package/dist/core/chart/mountSVGString.d.ts +5 -0
- package/dist/core/chart/overlaySeriesRegistry.d.ts +7 -0
- package/dist/core/chart/series/SeriesActions.d.ts +1 -0
- package/dist/core/chart/series/SeriesBufferLite.d.ts +13 -0
- package/dist/core/chart/series/seriesOptionsRegistry.d.ts +8 -0
- package/dist/core/chart/series/seriesTypeRegistry.d.ts +5 -0
- package/dist/core/chart/types.d.ts +2 -2
- package/dist/core/stacked/StackSVGComposer.d.ts +14 -0
- package/dist/core/stacked/index.d.ts +3 -2
- package/dist/core/stacked/types.d.ts +12 -4
- package/dist/createStackedChart-DjA3aJAu.js +2761 -0
- package/dist/createStackedChart-DjA3aJAu.js.map +1 -0
- package/dist/{hooks-CYPCxoZx.js → hooks-4wQH27r9.js} +7 -7
- package/dist/{hooks-CYPCxoZx.js.map → hooks-4wQH27r9.js.map} +1 -1
- package/dist/{index-qunX30Xu.js → index-B7PTX94B.js} +2133 -2133
- package/dist/index-B7PTX94B.js.map +1 -0
- package/dist/{index-BMiZoKmm.js → index-BgrvqltV.js} +67 -67
- package/dist/index-BgrvqltV.js.map +1 -0
- package/dist/index-Bj-xyXY6.js +582 -0
- package/dist/index-Bj-xyXY6.js.map +1 -0
- package/dist/index-qhscKTDy.js.map +1 -1
- package/dist/index.core.d.ts +8 -6
- package/dist/index.d.ts +1 -14
- package/dist/plugins/3d.js +3 -1
- package/dist/plugins/3d.js.map +1 -1
- package/dist/plugins/PluginManager.d.ts +5 -0
- package/dist/plugins/analysis.js.map +1 -1
- package/dist/plugins/annotations.js +8 -7
- package/dist/plugins/annotations.js.map +1 -1
- package/dist/plugins/broken-axis.js +198 -152
- package/dist/plugins/broken-axis.js.map +1 -1
- package/dist/plugins/createPlugin.d.ts +8 -0
- package/dist/plugins/debug.js +32 -32
- package/dist/plugins/debug.js.map +1 -1
- package/dist/plugins/forecasting.js +273 -258
- package/dist/plugins/forecasting.js.map +1 -1
- package/dist/plugins/gpu.js +2033 -209
- package/dist/plugins/gpu.js.map +1 -1
- package/dist/plugins/i18n.js +286 -23
- package/dist/plugins/i18n.js.map +1 -1
- package/dist/plugins/latex.js +766 -207
- package/dist/plugins/latex.js.map +1 -1
- package/dist/plugins/loading/index.d.ts +1 -2
- package/dist/plugins/loading.js +3 -4
- package/dist/plugins/ml-integration.js +107 -93
- package/dist/plugins/ml-integration.js.map +1 -1
- package/dist/plugins/offscreen.js +11 -10
- package/dist/plugins/offscreen.js.map +1 -1
- package/dist/plugins/radar/types.d.ts +11 -0
- package/dist/plugins/radar.js +64 -53
- package/dist/plugins/radar.js.map +1 -1
- package/dist/plugins/regression.js +254 -256
- package/dist/plugins/regression.js.map +1 -1
- package/dist/plugins/roi/index.d.ts +2 -0
- package/dist/plugins/roi.js +184 -145
- package/dist/plugins/roi.js.map +1 -1
- package/dist/plugins/snapshot.js +20 -15
- package/dist/plugins/snapshot.js.map +1 -1
- package/dist/plugins/streaming.js +1 -1
- package/dist/plugins/tools.js +1 -1
- package/dist/plugins/types.d.ts +4 -0
- package/dist/react.js +55 -58
- package/dist/react.js.map +1 -1
- package/dist/regression-HNdyk1Dm.js +28 -0
- package/dist/regression-HNdyk1Dm.js.map +1 -0
- package/dist/renderer/ChartSeriesRenderer.d.ts +3 -2
- package/dist/renderer/NativeWebGLRenderer.d.ts +2 -1
- package/dist/renderer/SVGChartRenderer.d.ts +15 -0
- package/dist/renderer/SankeyRenderer.d.ts +1 -0
- package/dist/renderer/native/NativeWebGLRenderer.d.ts +5 -1
- package/dist/renderer/native/draw.d.ts +2 -47
- package/dist/renderer/native/drawCore.d.ts +27 -0
- package/dist/renderer/native/drawExtended.d.ts +29 -0
- package/dist/renderer/native/frameRenderExtended.d.ts +1 -0
- package/dist/renderer/native/frameRenderRegistry.d.ts +27 -0
- package/dist/renderer/native/programFactoryCore.d.ts +6 -0
- package/dist/renderer/native/programFactoryExtended.d.ts +4 -0
- package/dist/renderer/native/utils.d.ts +3 -29
- package/dist/renderer/native/utilsCore.d.ts +14 -0
- package/dist/renderer/native/utilsExtended.d.ts +17 -0
- package/dist/renderer/overlaySeriesExtended.d.ts +1 -0
- package/dist/renderer/registerExtendedSeries.d.ts +1 -0
- package/dist/renderer/registerSVG.d.ts +5 -0
- package/dist/renderer/registerWebGPU.d.ts +2 -0
- package/dist/renderer/sankeyLayout.d.ts +29 -0
- package/dist/renderer/seriesBufferExtended.d.ts +4 -0
- package/dist/scientific/index.d.ts +1 -5
- package/dist/scientific/registerScientific.d.ts +1 -0
- package/dist/scientific.js +41 -41
- package/dist/solid.js +56 -59
- package/dist/solid.js.map +1 -1
- package/dist/svelte.js +26 -29
- package/dist/svelte.js.map +1 -1
- package/dist/tickUtils-B_X-ha13.js +41 -0
- package/dist/tickUtils-B_X-ha13.js.map +1 -0
- package/dist/trading/index.d.ts +1 -4
- package/dist/trading/registerTrading.d.ts +3 -0
- package/dist/trading.js +42 -42
- package/dist/types.d.ts +5 -4
- package/dist/velo-plot.full.js +1951 -1275
- package/dist/velo-plot.full.js.map +1 -1
- package/dist/velo-plot.js +33 -28
- package/dist/velo-plot.js.map +1 -1
- package/dist/vue/VeloPlot.vue.d.ts +1 -1
- package/dist/vue/index.d.ts +33 -33
- package/dist/vue.js +17 -20
- package/dist/vue.js.map +1 -1
- package/package.json +14 -1
- package/dist/ChartCore-BpzRvN4Y.js +0 -8467
- package/dist/ChartCore-BpzRvN4Y.js.map +0 -1
- package/dist/createStackedChart-Dm-YqUT7.js +0 -756
- package/dist/createStackedChart-Dm-YqUT7.js.map +0 -1
- package/dist/gpuRenderer-BpaMYz-k.js +0 -1848
- package/dist/gpuRenderer-BpaMYz-k.js.map +0 -1
- package/dist/index-BMiZoKmm.js.map +0 -1
- package/dist/index-qunX30Xu.js.map +0 -1
- package/dist/index-x4stH3jD.js +0 -282
- package/dist/index-x4stH3jD.js.map +0 -1
- package/dist/index.core-BmZe2jRQ.js.map +0 -1
- package/dist/mockDatafeed-DHIDPcpX.js +0 -515
- package/dist/mockDatafeed-DHIDPcpX.js.map +0 -1
- package/dist/symbols-DT0eLlpW.js +0 -568
- package/dist/symbols-DT0eLlpW.js.map +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SVGExportPluginContext } from './types';
|
|
2
|
+
|
|
3
|
+
export declare function exportWatermark(ctx: SVGExportPluginContext, text: string, options?: {
|
|
4
|
+
opacity?: number;
|
|
5
|
+
rotation?: number;
|
|
6
|
+
color?: string;
|
|
7
|
+
}): void;
|
|
8
|
+
export declare function exportGridHighlight(ctx: SVGExportPluginContext, bands: Array<{
|
|
9
|
+
axis: "x" | "y";
|
|
10
|
+
min: number;
|
|
11
|
+
max: number;
|
|
12
|
+
color?: string;
|
|
13
|
+
}>): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Series } from '../../../../Series';
|
|
2
|
+
import { Scale } from '../../../../../scales';
|
|
3
|
+
import { PlotArea } from '../../../../../types';
|
|
4
|
+
import { SVGDocumentBuilder } from '../SVGDocumentBuilder';
|
|
5
|
+
|
|
6
|
+
export declare function exportBandSeries(series: Series, plotArea: PlotArea, xScale: Scale, yScale: Scale, builder: SVGDocumentBuilder): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Series } from '../../../../Series';
|
|
2
|
+
import { Scale } from '../../../../../scales';
|
|
3
|
+
import { PlotArea } from '../../../../../types';
|
|
4
|
+
import { SVGDocumentBuilder } from '../SVGDocumentBuilder';
|
|
5
|
+
|
|
6
|
+
export declare function exportBarSeries(series: Series, plotArea: PlotArea, xScale: Scale, yScale: Scale, builder: SVGDocumentBuilder): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Series } from '../../../../Series';
|
|
2
|
+
import { Scale } from '../../../../../scales';
|
|
3
|
+
import { PlotArea } from '../../../../../types';
|
|
4
|
+
import { SVGDocumentBuilder } from '../SVGDocumentBuilder';
|
|
5
|
+
|
|
6
|
+
export declare function exportBoxplotSeries(series: Series, plotArea: PlotArea, xScale: Scale, yScale: Scale, builder: SVGDocumentBuilder): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Series } from '../../../../Series';
|
|
2
|
+
import { Scale } from '../../../../../scales';
|
|
3
|
+
import { PlotArea } from '../../../../../types';
|
|
4
|
+
import { SVGDocumentBuilder } from '../SVGDocumentBuilder';
|
|
5
|
+
|
|
6
|
+
export declare function exportCandlestickSeries(series: Series, plotArea: PlotArea, xScale: Scale, yScale: Scale, builder: SVGDocumentBuilder): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Scale } from '../../../../../scales';
|
|
2
|
+
|
|
3
|
+
/** Indices where x/y (and optional y2) are finite. */
|
|
4
|
+
export declare function collectFiniteIndices(x: Float32Array | Float64Array, y: Float32Array | Float64Array, y2?: Float32Array | Float64Array): number[];
|
|
5
|
+
/** Split finite samples into contiguous polyline segments (breaks at NaN gaps). */
|
|
6
|
+
export declare function buildLineSegments(indices: number[], x: Float32Array | Float64Array, y: Float32Array | Float64Array, xScale: Scale, yScale: Scale): string[][];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Series } from '../../../../Series';
|
|
2
|
+
import { PlotArea } from '../../../../../types';
|
|
3
|
+
import { SVGDocumentBuilder } from '../SVGDocumentBuilder';
|
|
4
|
+
|
|
5
|
+
export declare function exportGaugeSeries(series: Series, plotArea: PlotArea, builder: SVGDocumentBuilder): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Series } from '../../../../Series';
|
|
2
|
+
import { Scale } from '../../../../../scales';
|
|
3
|
+
import { PlotArea } from '../../../../../types';
|
|
4
|
+
import { SVGDocumentBuilder } from '../SVGDocumentBuilder';
|
|
5
|
+
|
|
6
|
+
export declare function exportHeatmapSeries(series: Series, plotArea: PlotArea, xScale: Scale, yScale: Scale, builder: SVGDocumentBuilder): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Series } from '../../../../Series';
|
|
2
|
+
import { Scale } from '../../../../../scales';
|
|
3
|
+
import { PlotArea } from '../../../../../types';
|
|
4
|
+
import { SVGDocumentBuilder } from '../SVGDocumentBuilder';
|
|
5
|
+
|
|
6
|
+
export declare function exportIndicatorSeries(series: Series, plotArea: PlotArea, xScale: Scale, yScale: Scale, builder: SVGDocumentBuilder): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Series } from '../../../../Series';
|
|
2
|
+
import { Scale } from '../../../../../scales';
|
|
3
|
+
import { PlotArea } from '../../../../../types';
|
|
4
|
+
import { SVGDocumentBuilder } from '../SVGDocumentBuilder';
|
|
5
|
+
|
|
6
|
+
export declare function buildStepPoints(data: {
|
|
7
|
+
x: Float32Array | Float64Array;
|
|
8
|
+
y: Float32Array | Float64Array;
|
|
9
|
+
}, xScale: Scale, yScale: Scale, stepMode: string): string[];
|
|
10
|
+
export declare function exportLineSeries(series: Series, plotArea: PlotArea, xScale: Scale, yScale: Scale, builder: SVGDocumentBuilder): void;
|
|
11
|
+
export declare function exportScatterPoints(series: Series, _plotArea: PlotArea, xScale: Scale, yScale: Scale, builder: SVGDocumentBuilder, skipLine?: boolean): void;
|
|
12
|
+
export declare function exportScatterSeries(series: Series, plotArea: PlotArea, xScale: Scale, yScale: Scale, builder: SVGDocumentBuilder): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Series } from '../../../../Series';
|
|
2
|
+
import { Scale } from '../../../../../scales';
|
|
3
|
+
import { PlotArea } from '../../../../../types';
|
|
4
|
+
import { SVGDocumentBuilder } from '../SVGDocumentBuilder';
|
|
5
|
+
|
|
6
|
+
export declare function exportPolarSeries(series: Series, plotArea: PlotArea, xScale: Scale, yScale: Scale, builder: SVGDocumentBuilder): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SVGExportContext } from '../SVGExportContext';
|
|
2
|
+
import { SVGDocumentBuilder } from '../SVGDocumentBuilder';
|
|
3
|
+
import { RadarSVGExportData } from '../../../../../plugins/radar/types';
|
|
4
|
+
|
|
5
|
+
export declare function exportRadarChart(ctx: SVGExportContext, builder: SVGDocumentBuilder, data: RadarSVGExportData): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SeriesType, PlotArea } from '../../../../../types';
|
|
2
|
+
import { Series } from '../../../../Series';
|
|
3
|
+
import { Scale } from '../../../../../scales';
|
|
4
|
+
import { SVGDocumentBuilder } from '../SVGDocumentBuilder';
|
|
5
|
+
import { SVGExportContext } from '../SVGExportContext';
|
|
6
|
+
|
|
7
|
+
export type SeriesSVGExporter = (series: Series, plotArea: PlotArea, xScale: Scale, yScale: Scale, builder: SVGDocumentBuilder, ctx?: SVGExportContext) => void;
|
|
8
|
+
export declare function getSeriesSVGExporter(type: SeriesType): SeriesSVGExporter | undefined;
|
|
9
|
+
export declare function exportAllSeries(ctx: SVGExportContext, builder: SVGDocumentBuilder): void;
|
|
10
|
+
export declare function getRegisteredSeriesTypes(): SeriesType[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Series } from '../../../../Series';
|
|
2
|
+
import { PlotArea } from '../../../../../types';
|
|
3
|
+
import { SVGDocumentBuilder } from '../SVGDocumentBuilder';
|
|
4
|
+
|
|
5
|
+
export declare function exportSankeySeries(series: Series, plotArea: PlotArea, builder: SVGDocumentBuilder): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { exportScatterSeries } from './line';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Series } from '../../../../Series';
|
|
2
|
+
import { Scale } from '../../../../../scales';
|
|
3
|
+
import { PlotArea } from '../../../../../types';
|
|
4
|
+
import { SVGDocumentBuilder } from '../SVGDocumentBuilder';
|
|
5
|
+
|
|
6
|
+
/** Ternary plot: equilateral triangle with normalized (a,b,c) components. */
|
|
7
|
+
export declare function exportTernarySeries(series: Series, plotArea: PlotArea, _xScale: Scale, _yScale: Scale, builder: SVGDocumentBuilder): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Series } from '../../../../Series';
|
|
2
|
+
import { Scale } from '../../../../../scales';
|
|
3
|
+
import { PlotArea } from '../../../../../types';
|
|
4
|
+
import { SVGDocumentBuilder } from '../SVGDocumentBuilder';
|
|
5
|
+
|
|
6
|
+
export declare function exportWaterfallSeries(series: Series, plotArea: PlotArea, xScale: Scale, yScale: Scale, builder: SVGDocumentBuilder): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scatter / legend symbol paths for SVG export.
|
|
3
|
+
*/
|
|
4
|
+
export type ScatterSymbol = "circle" | "square" | "diamond" | "triangle" | "triangleDown" | "cross" | "x" | "star";
|
|
5
|
+
export declare function symbolSvg(symbol: string, cx: number, cy: number, size: number, fill: string, opacity?: number, stroke?: string): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Scale } from '../../../../scales';
|
|
2
|
+
import { BusinessDayMapping } from '../../../time/TimeScale';
|
|
3
|
+
|
|
4
|
+
export declare function generateMinorTicks(majorTicks: number[], divisions: number): number[];
|
|
5
|
+
export declare function filterBusinessDayXTicks(ticks: number[], mapping: BusinessDayMapping | null | undefined): number[];
|
|
6
|
+
export declare function resolveXTicks(xScale: Scale, tickCount: number, mapping?: BusinessDayMapping | null): number[];
|
|
7
|
+
export declare function resolveGridXTicks(xScale: Scale, tickCount: number): number[];
|
|
8
|
+
export declare function primaryYScale(yAxes: Map<string, Scale>, primaryYAxisId?: string): Scale | undefined;
|
|
9
|
+
export declare function resolveYScale(yAxes: Map<string, Scale>, yAxisId: string | undefined, primaryYAxisId?: string): Scale | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Series } from '../Series';
|
|
2
|
+
import { PlotArea } from '../../types';
|
|
3
|
+
|
|
4
|
+
export type OverlaySeriesDrawer = (overlayCtx: CanvasRenderingContext2D, series: Series, plotArea: PlotArea) => void;
|
|
5
|
+
export declare function registerOverlaySeriesDrawer(type: string, drawer: OverlaySeriesDrawer): void;
|
|
6
|
+
export declare function getOverlaySeriesDrawer(type: string): OverlaySeriesDrawer | undefined;
|
|
7
|
+
export declare function drawRegisteredOverlaySeries(overlayCtx: CanvasRenderingContext2D, series: Iterable<Series>, plotArea: PlotArea): void;
|
|
@@ -2,6 +2,7 @@ import { SeriesOptions, HeatmapOptions, SeriesUpdateData } from '../../../types'
|
|
|
2
2
|
|
|
3
3
|
export declare function addSeries(ctx: any, options: SeriesOptions | HeatmapOptions): void;
|
|
4
4
|
export declare function removeSeries(ctx: any, id: string): void;
|
|
5
|
+
export declare function registerSeriesDataPreprocessor(fn: (ctx: unknown, data: SeriesUpdateData) => SeriesUpdateData): void;
|
|
5
6
|
export declare function updateSeries(ctx: any, id: string, data: SeriesUpdateData): void;
|
|
6
7
|
export declare function appendData(ctx: any, id: string, x: number[] | Float32Array, y: number[] | Float32Array): void;
|
|
7
8
|
export declare function setMaxPoints(ctx: any, id: string, maxPoints: number): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Series } from '../../Series';
|
|
2
|
+
|
|
3
|
+
export declare function updateSeriesBufferLite(ctx: {
|
|
4
|
+
renderer: {
|
|
5
|
+
createBuffer(id: string, data: Float32Array): void;
|
|
6
|
+
} | null;
|
|
7
|
+
}, s: Series): void;
|
|
8
|
+
export declare function refreshStackLite(ctx: {
|
|
9
|
+
renderer: {
|
|
10
|
+
createBuffer(id: string, data: Float32Array): void;
|
|
11
|
+
} | null;
|
|
12
|
+
series: Map<string, Series>;
|
|
13
|
+
}, stackId: string): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HeatmapOptions, SeriesOptions } from '../../../types';
|
|
2
|
+
|
|
3
|
+
export type SeriesOptionsPreprocessor = (ctx: unknown, options: SeriesOptions | HeatmapOptions) => SeriesOptions | HeatmapOptions;
|
|
4
|
+
export type SeriesOptionsExpander = (options: SeriesOptions | HeatmapOptions) => Array<SeriesOptions | HeatmapOptions>;
|
|
5
|
+
export declare function registerSeriesOptionsPreprocessor(fn: SeriesOptionsPreprocessor): void;
|
|
6
|
+
export declare function registerSeriesOptionsExpander(fn: SeriesOptionsExpander): void;
|
|
7
|
+
export declare function applySeriesOptionsPreprocessors(ctx: unknown, options: SeriesOptions | HeatmapOptions): SeriesOptions | HeatmapOptions;
|
|
8
|
+
export declare function expandSeriesOptions(options: SeriesOptions | HeatmapOptions): Array<SeriesOptions | HeatmapOptions>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Series } from '../../Series';
|
|
2
|
+
|
|
3
|
+
export type SeriesBufferHandler = (ctx: unknown, s: Series) => void;
|
|
4
|
+
export declare function registerSeriesBufferHandler(type: string, handler: SeriesBufferHandler): void;
|
|
5
|
+
export declare function getSeriesBufferHandler(type: string): SeriesBufferHandler | undefined;
|
|
@@ -45,7 +45,7 @@ export interface Chart {
|
|
|
45
45
|
/** Get current device pixel ratio used for rendering */
|
|
46
46
|
getDPR(): number;
|
|
47
47
|
/** Actual renderer backend in use */
|
|
48
|
-
getActiveRenderer(): "webgl" | "webgpu";
|
|
48
|
+
getActiveRenderer(): "webgl" | "webgpu" | "svg";
|
|
49
49
|
/** Set device pixel ratio and trigger re-render */
|
|
50
50
|
setDPR(dpr: number): void;
|
|
51
51
|
/**
|
|
@@ -59,7 +59,7 @@ export interface Chart {
|
|
|
59
59
|
destroy(): void;
|
|
60
60
|
exportImage(type?: "png" | "jpeg"): string;
|
|
61
61
|
/** Vector export of series, axes, grid, and tick labels */
|
|
62
|
-
exportSVG(): string;
|
|
62
|
+
exportSVG(options?: import('./exporter/SVGExporter').SVGExportOptions): string;
|
|
63
63
|
autoScale(animate?: boolean): void;
|
|
64
64
|
setTheme(theme: string | object): void;
|
|
65
65
|
/** Access to data analysis utilities */
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Chart } from '../chart/types';
|
|
2
|
+
import { StackSVGExportOptions } from './types';
|
|
3
|
+
|
|
4
|
+
export interface StackSVGPaneLayout {
|
|
5
|
+
chart: Chart;
|
|
6
|
+
wrapper: HTMLElement;
|
|
7
|
+
offsetX: number;
|
|
8
|
+
offsetY: number;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function buildStackPaneLayouts(container: HTMLDivElement, paneWrappers: HTMLDivElement[], paneCharts: Chart[]): StackSVGPaneLayout[];
|
|
13
|
+
export declare function composeStackSVG(container: HTMLDivElement, paneWrappers: HTMLDivElement[], paneCharts: Chart[], dividers: HTMLElement[], options?: StackSVGExportOptions): string;
|
|
14
|
+
export declare function exportStackSVG(container: HTMLDivElement, paneWrappers: HTMLDivElement[], paneCharts: Chart[], dividers: HTMLElement[], backgroundColor: string, options?: StackSVGExportOptions): string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { createStackedChart } from './createStackedChart';
|
|
2
|
-
export type { StackedChart, StackedChartOptions, StackedPaneConfig, StackedSyncOptions, StackDirection, StackSnapshotOptions, } from './types';
|
|
2
|
+
export type { StackedChart, StackedChartOptions, StackedPaneConfig, StackedSyncOptions, StackDirection, StackSnapshotOptions, StackSVGExportOptions, } from './types';
|
|
3
3
|
export { STACKED_MAX_PANES, STACKED_DEFAULT_MIN_PANE_RATIO, } from './types';
|
|
4
|
-
export { exportStackImage } from './stackExport';
|
|
4
|
+
export { exportStackImage, stackResolutionScale } from './stackExport';
|
|
5
|
+
export { exportStackSVG, composeStackSVG, buildStackPaneLayouts } from './StackSVGComposer';
|
|
5
6
|
export type { StackExportOptions } from './stackExport';
|
|
6
7
|
export { normalizePaneHeights, resolveMinPaneHeightPx, } from './paneResize';
|
|
@@ -3,6 +3,7 @@ import { ChartGroup, SyncAxis, SyncOptions } from '../sync';
|
|
|
3
3
|
import { ChartOptions as RootChartOptions, Range, SeriesOptions } from '../../types';
|
|
4
4
|
import { LayoutOptions } from '../layout';
|
|
5
5
|
import { AddIndicatorResult } from '../indicator/addIndicator';
|
|
6
|
+
import { SVGExportOptions } from '../chart/exporter/SVGExporter';
|
|
6
7
|
|
|
7
8
|
/** Stack layout direction */
|
|
8
9
|
export type StackDirection = "vertical" | "horizontal";
|
|
@@ -101,12 +102,20 @@ export interface StackedChart {
|
|
|
101
102
|
paneId?: string;
|
|
102
103
|
chart?: Chart;
|
|
103
104
|
}>;
|
|
104
|
-
/** Export the entire stack as one PNG/JPEG/WebP
|
|
105
|
+
/** Export the entire stack as one PNG/JPEG/WebP/SVG (WYSIWYG layout) */
|
|
105
106
|
exportImage(options?: StackSnapshotOptions): Promise<string>;
|
|
107
|
+
/** Export the entire stack as vector SVG */
|
|
108
|
+
exportSVG(options?: StackSVGExportOptions): string;
|
|
106
109
|
/** Alias for exportImage */
|
|
107
110
|
snapshot(options?: StackSnapshotOptions): Promise<string>;
|
|
108
111
|
destroy(): void;
|
|
109
112
|
}
|
|
113
|
+
/** Stack SVG export options */
|
|
114
|
+
export type StackSVGExportOptions = SVGExportOptions & {
|
|
115
|
+
includeDividers?: boolean;
|
|
116
|
+
includeBackground?: boolean;
|
|
117
|
+
backgroundColor?: string;
|
|
118
|
+
};
|
|
110
119
|
export declare const STACKED_MAX_PANES = 5;
|
|
111
120
|
/** Default minimum pane height as a fraction of available stack height (1/6). */
|
|
112
121
|
export declare const STACKED_DEFAULT_MIN_PANE_RATIO: number;
|
|
@@ -121,10 +130,9 @@ export declare const STACKED_FULL_X_MARGIN: {
|
|
|
121
130
|
export declare const STACKED_FULL_Y_MARGIN: {
|
|
122
131
|
left: number;
|
|
123
132
|
};
|
|
124
|
-
|
|
125
|
-
export type StackSnapshotFormat = "png" | "jpeg" | "webp";
|
|
133
|
+
export type StackSnapshotFormat = "png" | "jpeg" | "webp" | "svg";
|
|
126
134
|
export type StackSnapshotResolution = "standard" | "2k" | "4k" | "8k" | number;
|
|
127
|
-
export interface StackSnapshotOptions {
|
|
135
|
+
export interface StackSnapshotOptions extends Partial<StackSVGExportOptions> {
|
|
128
136
|
format?: StackSnapshotFormat;
|
|
129
137
|
quality?: number;
|
|
130
138
|
resolution?: StackSnapshotResolution;
|