velo-plot 3.1.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/dist/{ChartCore-AnR_3Xkb.js → ChartCore-KYG2HTcK.js} +1349 -1213
- package/dist/ChartCore-KYG2HTcK.js.map +1 -0
- package/dist/{PluginRegistry-CzMHebYP.js → PluginRegistry-CDf_jcnp.js} +2 -2
- package/dist/{PluginRegistry-CzMHebYP.js.map → PluginRegistry-CDf_jcnp.js.map} +1 -1
- 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 +4 -4
- package/dist/{chartSyncBridge-D_rCtbFq.js → chartSyncBridge-C1uRy0ZS.js} +3 -3
- package/dist/{chartSyncBridge-D_rCtbFq.js.map → chartSyncBridge-C1uRy0ZS.js.map} +1 -1
- package/dist/core/chart/ChartCore.d.ts +7 -3
- 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/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/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-DH-3bewj.js → hooks-4wQH27r9.js} +3 -3
- package/dist/{hooks-DH-3bewj.js.map → hooks-4wQH27r9.js.map} +1 -1
- package/dist/index-Bj-xyXY6.js +582 -0
- package/dist/index-Bj-xyXY6.js.map +1 -0
- package/dist/plugins/PluginManager.d.ts +5 -0
- 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/forecasting.js +273 -258
- package/dist/plugins/forecasting.js.map +1 -1
- package/dist/plugins/ml-integration.js +107 -93
- package/dist/plugins/ml-integration.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/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/types.d.ts +4 -0
- package/dist/react.js +2 -2
- 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/SVGChartRenderer.d.ts +15 -0
- package/dist/renderer/SankeyRenderer.d.ts +1 -0
- package/dist/renderer/registerSVG.d.ts +5 -0
- package/dist/renderer/sankeyLayout.d.ts +29 -0
- package/dist/scientific.js +2 -2
- package/dist/solid.js +2 -2
- package/dist/svelte.js +2 -2
- package/dist/tickUtils-B_X-ha13.js +41 -0
- package/dist/tickUtils-B_X-ha13.js.map +1 -0
- package/dist/trading.js +3 -3
- package/dist/types.d.ts +2 -1
- package/dist/velo-plot.full.js +1107 -1292
- package/dist/velo-plot.full.js.map +1 -1
- package/dist/velo-plot.js +2 -2
- package/dist/vue/VeloPlot.vue.d.ts +1 -1
- package/dist/vue/index.d.ts +33 -33
- package/dist/vue.js +2 -2
- package/package.json +6 -1
- package/dist/ChartCore-AnR_3Xkb.js.map +0 -1
- package/dist/createStackedChart-DqcLCFGS.js +0 -1338
- package/dist/createStackedChart-DqcLCFGS.js.map +0 -1
- package/dist/index-Cv6ZDLWf.js +0 -521
- package/dist/index-Cv6ZDLWf.js.map +0 -1
|
@@ -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
|
+
export declare function exportErrorBarsForSeries(series: Series, plotArea: PlotArea, xScale: Scale, yScale: Scale, builder: SVGDocumentBuilder): void;
|
|
7
|
+
export declare function exportErrorBars(ctx: import('../SVGExportContext').SVGExportContext, builder: SVGDocumentBuilder): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SVGExportContext } from '../SVGExportContext';
|
|
2
|
+
import { SVGDocumentBuilder } from '../SVGDocumentBuilder';
|
|
3
|
+
export { exportGrid } from './grid';
|
|
4
|
+
export { exportAxes } from './axes';
|
|
5
|
+
export { exportTitle } from './title';
|
|
6
|
+
export { exportPlotBorder } from './border';
|
|
7
|
+
export { exportLegend } from './legend';
|
|
8
|
+
export { exportErrorBars } from './errorBars';
|
|
9
|
+
export declare function exportCursor(ctx: SVGExportContext, builder: SVGDocumentBuilder): void;
|
|
10
|
+
export declare function exportSelection(ctx: SVGExportContext, builder: SVGDocumentBuilder): void;
|
|
11
|
+
export declare function exportPriceAlerts(ctx: SVGExportContext, builder: SVGDocumentBuilder): void;
|
|
12
|
+
export declare function exportAllOverlays(ctx: SVGExportContext, builder: SVGDocumentBuilder): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SVGExportContext } from '../SVGExportContext';
|
|
2
|
+
import { RadarSVGExportData } from '../../../../../plugins/radar/types';
|
|
3
|
+
|
|
4
|
+
export declare function getRadarSVGExportData(ctx: SVGExportContext): RadarSVGExportData | null;
|
|
5
|
+
export declare function hasActiveRadarPlugin(ctx: SVGExportContext): boolean;
|
|
6
|
+
export declare function shouldSkipCartesianOverlays(ctx: SVGExportContext, isSpecialSeriesChart: boolean): boolean;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SVGExportContext } from '../SVGExportContext';
|
|
2
|
+
import { SVGDocumentBuilder } from '../SVGDocumentBuilder';
|
|
3
|
+
|
|
4
|
+
export declare function exportPolarGrid(ctx: SVGExportContext, builder: SVGDocumentBuilder, radialDivisions: number, angularDivisions: number, angleMode: "degrees" | "radians"): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Series } from '../../../../Series';
|
|
2
|
+
import { SVGExportContext } from '../SVGExportContext';
|
|
3
|
+
|
|
4
|
+
export interface SpecialChartInfo {
|
|
5
|
+
isSpecialChart: boolean;
|
|
6
|
+
hasPolarSeries: boolean;
|
|
7
|
+
hasGaugeSeries: boolean;
|
|
8
|
+
hasSankeySeries: boolean;
|
|
9
|
+
maxRadius: number;
|
|
10
|
+
polarAngleMode: "degrees" | "radians";
|
|
11
|
+
polarRadialDivisions: number;
|
|
12
|
+
polarAngularDivisions: number;
|
|
13
|
+
}
|
|
14
|
+
export declare function detectSpecialChart(series: Series[]): SpecialChartInfo;
|
|
15
|
+
export declare function detectSpecialChartFromContext(ctx: SVGExportContext): SpecialChartInfo;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Annotation } from '../../../../annotations/types';
|
|
2
|
+
import { SVGExportPluginContext } from './types';
|
|
3
|
+
|
|
4
|
+
export declare function exportAnnotationToSVG(annotation: Annotation, ctx: SVGExportPluginContext): string[];
|
|
5
|
+
export declare function exportAnnotations(ctx: SVGExportPluginContext, annotations: Annotation[]): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SVGExportPluginContext } from './types';
|
|
2
|
+
|
|
3
|
+
type BreakSymbol = "diagonal" | "zigzag" | "wave" | "simple";
|
|
4
|
+
export declare function exportBrokenAxisMarkers(ctx: SVGExportPluginContext, breaks: Array<{
|
|
5
|
+
axis: "x" | "y";
|
|
6
|
+
position: number;
|
|
7
|
+
style?: BreakSymbol;
|
|
8
|
+
color?: string;
|
|
9
|
+
}>): void;
|
|
10
|
+
/** Export breaks from PluginBrokenAxis config (data-space start/end). */
|
|
11
|
+
export declare function exportBrokenAxisFromConfig(ctx: SVGExportPluginContext, axes: Record<string, {
|
|
12
|
+
breaks: Array<{
|
|
13
|
+
start: number;
|
|
14
|
+
end: number;
|
|
15
|
+
symbol?: BreakSymbol;
|
|
16
|
+
}>;
|
|
17
|
+
defaultSymbol?: BreakSymbol;
|
|
18
|
+
symbolColor?: string;
|
|
19
|
+
}>): void;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SVGExportPluginContext } from './types';
|
|
2
|
+
|
|
3
|
+
/** LaTeX labels via foreignObject (phase 1 strategy per roadmap). */
|
|
4
|
+
export declare function exportLatexText(ctx: SVGExportPluginContext, text: string, x: number, y: number, options: {
|
|
5
|
+
fontSize?: number;
|
|
6
|
+
color?: string;
|
|
7
|
+
width?: number;
|
|
8
|
+
height?: number;
|
|
9
|
+
}): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ChartPlugin } from '../../../../../plugins/types';
|
|
2
|
+
import { SVGExportPluginContext } from './types';
|
|
3
|
+
|
|
4
|
+
/** Collect plugin overlay data from chart plugin manager during export. */
|
|
5
|
+
export declare function collectPluginSVGData(pluginManager: {
|
|
6
|
+
get: (name: string) => ChartPlugin | undefined;
|
|
7
|
+
notifyExportSVG?: (ctx: SVGExportPluginContext) => void;
|
|
8
|
+
}, ctx: SVGExportPluginContext): void;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { SVGExportPluginContext } from './types';
|
|
2
|
+
|
|
3
|
+
export interface RegressionOverlay {
|
|
4
|
+
points: Array<{
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
}>;
|
|
8
|
+
color?: string;
|
|
9
|
+
band?: {
|
|
10
|
+
upper: Array<{
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
}>;
|
|
14
|
+
lower: Array<{
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
}>;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export declare function exportRegressionOverlay(ctx: SVGExportPluginContext, overlay: RegressionOverlay): void;
|
|
21
|
+
export declare function exportForecastOverlay(ctx: SVGExportPluginContext, forecast: Array<{
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
}>, ci?: {
|
|
25
|
+
upper: Array<{
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
}>;
|
|
29
|
+
lower: Array<{
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
}>;
|
|
33
|
+
}, color?: string): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SVGExportPluginContext } from './types';
|
|
2
|
+
|
|
3
|
+
export interface RoiExportRegion {
|
|
4
|
+
tool: "rectangle" | "circle" | "polygon" | "lasso";
|
|
5
|
+
points: Array<{
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
}>;
|
|
9
|
+
color?: string;
|
|
10
|
+
fill?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function exportRoiRegions(ctx: SVGExportPluginContext, regions: RoiExportRegion[]): void;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Series } from '../../../../Series';
|
|
2
|
+
import { Scale } from '../../../../../scales';
|
|
3
|
+
import { ChartTheme } from '../../../../../theme';
|
|
4
|
+
import { Bounds, PlotArea } from '../../../../../types';
|
|
5
|
+
import { SVGDocumentBuilder } from '../SVGDocumentBuilder';
|
|
6
|
+
import { SVGExportContext } from '../SVGExportContext';
|
|
7
|
+
|
|
8
|
+
export interface SVGExportPluginContext {
|
|
9
|
+
series: Series[];
|
|
10
|
+
viewBounds: Bounds;
|
|
11
|
+
plotArea: PlotArea;
|
|
12
|
+
xScale: Scale;
|
|
13
|
+
yScales: Map<string, Scale>;
|
|
14
|
+
theme: ChartTheme;
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
builder?: SVGDocumentBuilder;
|
|
18
|
+
exportContext?: SVGExportContext;
|
|
19
|
+
pushElements?: (layer: string, elements: string[]) => void;
|
|
20
|
+
/** @internal */
|
|
21
|
+
_layer?: string;
|
|
22
|
+
/** @internal */
|
|
23
|
+
_elements?: string[];
|
|
24
|
+
}
|
|
25
|
+
export type SVGPluginExporter = (ctx: SVGExportPluginContext) => void;
|
|
26
|
+
export declare function registerSVGPluginExporter(pluginName: string, exporter: SVGPluginExporter): void;
|
|
27
|
+
export declare function getSVGPluginExporters(): Map<string, SVGPluginExporter>;
|
|
28
|
+
export declare function runSVGPluginExporters(ctx: SVGExportPluginContext, builder: SVGDocumentBuilder): void;
|
|
@@ -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;
|
|
@@ -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;
|