@photonviz/core 0.3.1 → 0.3.2

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/index.d.ts CHANGED
@@ -1380,6 +1380,25 @@ interface PlotTitleOptions {
1380
1380
  align?: "left" | "center" | "right";
1381
1381
  }
1382
1382
 
1383
+ /**
1384
+ * Shared image-export helpers used by Plot / Plot3D / PolarPlot. Each plot
1385
+ * composites its layers into a single 2D canvas, then these turn that canvas into
1386
+ * a data URL / Blob / download / clipboard image.
1387
+ */
1388
+ /** Options accepted by the export methods. */
1389
+ interface ExportOptions {
1390
+ /** Fill color behind the plot (default the theme page color; `"transparent"` keeps alpha). */
1391
+ background?: string;
1392
+ /** Encoder quality 0..1 for lossy types (`image/jpeg`, `image/webp`). */
1393
+ quality?: number;
1394
+ }
1395
+ /** Turn a canvas into a `Blob` (default PNG). */
1396
+ declare function canvasToBlob(canvas: HTMLCanvasElement, type?: string, quality?: number): Promise<Blob | null>;
1397
+ /** Download a canvas as an image file (PNG by default). */
1398
+ declare function downloadCanvas(canvas: HTMLCanvasElement, filename?: string, type?: string, quality?: number): Promise<void>;
1399
+ /** Copy a canvas to the clipboard as a PNG. Throws where the browser can't. */
1400
+ declare function copyCanvasToClipboard(canvas: HTMLCanvasElement): Promise<void>;
1401
+
1383
1402
  interface AxisScaleOptions {
1384
1403
  type?: ScaleType;
1385
1404
  /** Fixed domain. If omitted, the axis autoscales to the data. */
@@ -1469,7 +1488,10 @@ interface GraphInput extends Omit<GraphOptions, "x" | "y"> {
1469
1488
  /**
1470
1489
  * A Canvas2D overlay marker drawn above the data, projected through the scales:
1471
1490
  * a full-width/height guide line (`span`), a shaded range (`band`), a rectangle
1472
- * (`box`), or text (`label`). `yAxis` targets a secondary axis where relevant.
1491
+ * (`box`), text (`label`), an arbitrary segment (`line` trendlines), a segment
1492
+ * extended past its end (`ray`), or Fibonacci retracement levels (`fib`). `yAxis`
1493
+ * targets a secondary axis where relevant. All coordinates are in data space, so
1494
+ * annotations pan and zoom with the chart.
1473
1495
  */
1474
1496
  type Annotation = {
1475
1497
  type: "span";
@@ -1492,6 +1514,7 @@ type Annotation = {
1492
1514
  y: Range;
1493
1515
  color?: string;
1494
1516
  border?: string;
1517
+ label?: string;
1495
1518
  yAxis?: string;
1496
1519
  } | {
1497
1520
  type: "label";
@@ -1502,7 +1525,42 @@ type Annotation = {
1502
1525
  font?: string;
1503
1526
  align?: "left" | "center" | "right";
1504
1527
  yAxis?: string;
1528
+ } | {
1529
+ type: "line";
1530
+ x0: number;
1531
+ y0: number;
1532
+ x1: number;
1533
+ y1: number;
1534
+ color?: string;
1535
+ width?: number;
1536
+ dash?: number[];
1537
+ label?: string;
1538
+ yAxis?: string;
1539
+ } | {
1540
+ type: "ray";
1541
+ x0: number;
1542
+ y0: number;
1543
+ x1: number;
1544
+ y1: number;
1545
+ color?: string;
1546
+ width?: number;
1547
+ dash?: number[];
1548
+ label?: string;
1549
+ yAxis?: string;
1550
+ } | {
1551
+ type: "fib";
1552
+ x0: number;
1553
+ x1: number;
1554
+ high: number;
1555
+ low: number;
1556
+ ratios?: number[];
1557
+ color?: string;
1558
+ fill?: boolean;
1559
+ label?: string;
1560
+ yAxis?: string;
1505
1561
  };
1562
+ /** An interactive drawing tool: click-drag on the plot to place the shape. */
1563
+ type DrawTool = "trendline" | "hline" | "ray" | "fib" | "rect";
1506
1564
  /** One line of the hover tooltip header, produced by {@link PlotOptions.hoverReadout}. */
1507
1565
  interface HoverReadoutRow {
1508
1566
  label: string;
@@ -1531,6 +1589,10 @@ interface PlotOptions {
1531
1589
  interactive?: boolean;
1532
1590
  /** Show the built-in toolbar (home + pan/box/X/Y zoom modes). Default true. */
1533
1591
  showToolbar?: boolean;
1592
+ /** Add drawing tools (trendline / horizontal / ray / Fibonacci / rectangle) to the toolbar. Default false. */
1593
+ drawingTools?: boolean;
1594
+ /** Accessible label for the chart (sets `role="img"` + `aria-label`). Auto-summarized if omitted. */
1595
+ ariaLabel?: string;
1534
1596
  /** Initial interaction mode. Default `"pan"`. */
1535
1597
  mode?: InteractionMode;
1536
1598
  /** Enable hover crosshair + tooltip. Default true. */
@@ -1578,6 +1640,7 @@ interface PlotOptions {
1578
1640
  */
1579
1641
  declare class Plot {
1580
1642
  private container;
1643
+ private ariaLabel?;
1581
1644
  private gridCanvas;
1582
1645
  private dataCanvas;
1583
1646
  private axisCanvas;
@@ -1619,6 +1682,13 @@ declare class Plot {
1619
1682
  private lastEmittedX;
1620
1683
  private lastEmittedCursor;
1621
1684
  private linkedCursorX;
1685
+ private drawTool;
1686
+ private drawings;
1687
+ private pendingDrawing;
1688
+ private drawToolCbs;
1689
+ private hoverDrawing;
1690
+ private selectedDrawing;
1691
+ private drawMenu;
1622
1692
  private tooltip;
1623
1693
  /** A point clicked to pin its details, until another click clears it. */
1624
1694
  private selected;
@@ -1637,6 +1707,11 @@ declare class Plot {
1637
1707
  /** Pixel x-position (and title x) for each y axis, by draw order per side. */
1638
1708
  private yAxisPositions;
1639
1709
  private register;
1710
+ /** Set the chart's accessible label (`aria-label`). Pass `undefined` to auto-summarize. */
1711
+ setAriaLabel(text: string | undefined): void;
1712
+ /** A one-line text summary of the chart (title + series), for a11y / tooltips. */
1713
+ describe(): string;
1714
+ private updateAria;
1640
1715
  /**
1641
1716
  * Register a layer built outside core (e.g. `@photonviz/map`). Use with
1642
1717
  * {@link context} to construct the layer against this plot's WebGL2 context.
@@ -1700,6 +1775,41 @@ declare class Plot {
1700
1775
  addAnnotation(a: Annotation): () => void;
1701
1776
  /** Remove all annotations. */
1702
1777
  clearAnnotations(): void;
1778
+ /** Activate a drawing tool (click-drag on the plot to place), or `null` to stop drawing. */
1779
+ setDrawTool(tool: DrawTool | null): void;
1780
+ /** The active drawing tool, or `null`. */
1781
+ getDrawTool(): DrawTool | null;
1782
+ /** Subscribe to draw-tool changes (used by the toolbar). Returns an unsubscribe fn. */
1783
+ onDrawToolChange(cb: (t: DrawTool | null) => void): () => void;
1784
+ /** Add a drawing programmatically (same shapes the tools produce). */
1785
+ addDrawing(a: Annotation): void;
1786
+ /** All user drawings (trendlines, fib levels, …). */
1787
+ getDrawings(): Annotation[];
1788
+ /** Remove every user drawing. */
1789
+ clearDrawings(): void;
1790
+ /** Canvas-space pixel → data coordinates on the x + primary y scale. */
1791
+ private dataAtPx;
1792
+ /** Build the annotation for a draw tool from its start + current data points. */
1793
+ private buildDrawing;
1794
+ private drawingYScale;
1795
+ /** Editable handle points (data space) for a drawing; `[]` if it has none. */
1796
+ private drawingHandlePts;
1797
+ /** Move handle `i` of a drawing to a new data-space point (all editable types). */
1798
+ private setDrawingHandle;
1799
+ /** Translate a whole drawing by a data-space delta (drag the body). */
1800
+ private translateDrawing;
1801
+ /** Cursor→drawing distance in px (segment for line/ray, edges for box/fib, the line for span). */
1802
+ private drawingBodyDist;
1803
+ /** Topmost drawing under the cursor and its handle (handle −1 = body, index −1 = none). */
1804
+ private hitDrawing;
1805
+ private removeDrawing;
1806
+ private hideDrawMenu;
1807
+ /** Right-click context menu for a drawing: rename, recolor, delete. */
1808
+ private showDrawMenu;
1809
+ /** Recolor a drawing: a box keeps its translucent fill + opaque border; others take the color directly. */
1810
+ private recolorDrawing;
1811
+ /** Prompt for a label on a drawing (double-click / context menu). */
1812
+ private renameDrawing;
1703
1813
  /** Compute an STFT of `signal` and render it as a heatmap (time × frequency). */
1704
1814
  addHeatmapSpectrogram(signal: ArrayLike<number>, opts?: {
1705
1815
  fftSize?: number;
@@ -1748,6 +1858,20 @@ declare class Plot {
1748
1858
  onModeChange(cb: (mode: InteractionMode) => void): void;
1749
1859
  /** Reset to the home view: explicit domains restored, auto axes re-fit to data. */
1750
1860
  home(): void;
1861
+ /**
1862
+ * Composite this plot's layers (grid → data → axes/labels) into a single 2D
1863
+ * canvas at device resolution. `background` fills behind the plot (default the
1864
+ * theme's page color; pass `"transparent"` to keep alpha).
1865
+ */
1866
+ private compositeCanvas;
1867
+ /** Export the current view as a data URL (default PNG). */
1868
+ toDataURL(type?: string, opts?: ExportOptions): string;
1869
+ /** Export the current view as a `Blob` (default PNG). */
1870
+ toBlob(type?: string, opts?: ExportOptions): Promise<Blob | null>;
1871
+ /** Download the current view as an image (PNG by default). */
1872
+ downloadImage(filename?: string, type?: string, opts?: ExportOptions): Promise<void>;
1873
+ /** Copy the current view to the clipboard as a PNG. Throws if the browser can't. */
1874
+ copyToClipboard(opts?: ExportOptions): Promise<void>;
1751
1875
  /** Re-fit auto axes to the data: x over all series, each y axis over its own series. */
1752
1876
  autoscale(): void;
1753
1877
  destroy(): void;
@@ -1823,6 +1947,15 @@ interface ToolbarHost {
1823
1947
  getMode(): InteractionMode;
1824
1948
  home(): void;
1825
1949
  onModeChange(cb: (mode: InteractionMode) => void): void;
1950
+ /** Optional: download the current view as a PNG. Adds a toolbar button when present. */
1951
+ download?(): void;
1952
+ /** Optional: interactive drawing tools. Adds a tool group (trendline / hline / ray / fib / rect / clear) when present. */
1953
+ drawTools?: {
1954
+ set(tool: string | null): void;
1955
+ get(): string | null;
1956
+ clear(): void;
1957
+ onChange(cb: (tool: string | null) => void): void;
1958
+ };
1826
1959
  }
1827
1960
  interface ToolbarTheme {
1828
1961
  bg: string;
@@ -1952,6 +2085,16 @@ declare class PolarPlot {
1952
2085
  getRotation(): number;
1953
2086
  /** Set the rotation offset (radians, CCW) and redraw. */
1954
2087
  setRotation(rad: number): void;
2088
+ /** Composite grid → data → overlay into one canvas at device resolution. */
2089
+ private compositeCanvas;
2090
+ /** Export the current view as a data URL (default PNG). */
2091
+ toDataURL(type?: string, opts?: ExportOptions): string;
2092
+ /** Export the current view as a `Blob` (default PNG). */
2093
+ toBlob(type?: string, opts?: ExportOptions): Promise<Blob | null>;
2094
+ /** Download the current view as an image (PNG by default). */
2095
+ downloadImage(filename?: string, type?: string, opts?: ExportOptions): Promise<void>;
2096
+ /** Copy the current view to the clipboard as a PNG. */
2097
+ copyToClipboard(opts?: ExportOptions): Promise<void>;
1955
2098
  destroy(): void;
1956
2099
  private resize;
1957
2100
  requestRender(): void;
@@ -2456,6 +2599,8 @@ interface Plot3DOptions {
2456
2599
  hover?: boolean;
2457
2600
  /** Show a reset-view (home) button. Default true. */
2458
2601
  resetButton?: boolean;
2602
+ /** Show a download-PNG button. Default true. */
2603
+ downloadButton?: boolean;
2459
2604
  /** Draw grid lines on the back walls of the cube. Default true. */
2460
2605
  gridPlanes?: boolean;
2461
2606
  /** Auto-orbit the camera: `true` for a default speed, or radians/frame. Default off. */
@@ -2509,6 +2654,7 @@ declare class Plot3D {
2509
2654
  private colorbarDiv;
2510
2655
  private tooltip;
2511
2656
  private resetBtn;
2657
+ private downloadBtn;
2512
2658
  private hoverEnabled;
2513
2659
  /** Screen position (device px) of the picked point, for the highlight ring. */
2514
2660
  private hoverHit;
@@ -2551,6 +2697,16 @@ declare class Plot3D {
2551
2697
  removeLayer(layer: Layer3D): void;
2552
2698
  /** Re-fit the axes to the data and redraw — call after a layer's `setData(...)`. */
2553
2699
  refresh(): void;
2700
+ /** Copy the current 3D frame (already composited on one canvas) into a fresh canvas. */
2701
+ private compositeCanvas;
2702
+ /** Export the current view as a data URL (default PNG). */
2703
+ toDataURL(type?: string, opts?: ExportOptions): string;
2704
+ /** Export the current view as a `Blob` (default PNG). */
2705
+ toBlob(type?: string, opts?: ExportOptions): Promise<Blob | null>;
2706
+ /** Download the current view as an image (PNG by default). */
2707
+ downloadImage(filename?: string, type?: string, opts?: ExportOptions): Promise<void>;
2708
+ /** Copy the current view to the clipboard as a PNG. */
2709
+ copyToClipboard(opts?: ExportOptions): Promise<void>;
2554
2710
  destroy(): void;
2555
2711
  private recompute;
2556
2712
  /** Build tick-mark line geometry + tick/title labels from the data bounds. */
@@ -2746,6 +2902,54 @@ declare function trueRange(high: ArrayLike<number>, low: ArrayLike<number>, clos
2746
2902
  declare function atr(high: ArrayLike<number>, low: ArrayLike<number>, close: ArrayLike<number>, period?: number): Float64Array;
2747
2903
  /** Index of the first non-NaN value (−1 if all NaN). Handy for trimming warm-up. */
2748
2904
  declare function firstFinite(values: ArrayLike<number>): number;
2905
+ interface Stochastic {
2906
+ k: Float64Array;
2907
+ d: Float64Array;
2908
+ }
2909
+ /** Stochastic oscillator: %K over `kPeriod`, %D = SMA(%K, dPeriod). Values 0..100. */
2910
+ declare function stochastic(high: ArrayLike<number>, low: ArrayLike<number>, close: ArrayLike<number>, kPeriod?: number, dPeriod?: number): Stochastic;
2911
+ interface Channel {
2912
+ middle: Float64Array;
2913
+ upper: Float64Array;
2914
+ lower: Float64Array;
2915
+ }
2916
+ /** Keltner Channels: EMA(period) ± mult·ATR(atrPeriod). */
2917
+ declare function keltner(high: ArrayLike<number>, low: ArrayLike<number>, close: ArrayLike<number>, period?: number, mult?: number, atrPeriod?: number): Channel;
2918
+ /** On-Balance Volume — a running signed volume total (no warm-up). */
2919
+ declare function obv(close: ArrayLike<number>, volume: ArrayLike<number>): Float64Array;
2920
+ interface Ichimoku {
2921
+ conversion: Float64Array;
2922
+ base: Float64Array;
2923
+ spanA: Float64Array;
2924
+ spanB: Float64Array;
2925
+ }
2926
+ /**
2927
+ * Ichimoku lines (conversion/base/spanA/spanB). Spans are returned **unshifted**
2928
+ * (traditional charts project the cloud forward by `basePeriod` bars).
2929
+ */
2930
+ declare function ichimoku(high: ArrayLike<number>, low: ArrayLike<number>, convPeriod?: number, basePeriod?: number, spanBPeriod?: number): Ichimoku;
2931
+ interface Adx {
2932
+ adx: Float64Array;
2933
+ plusDI: Float64Array;
2934
+ minusDI: Float64Array;
2935
+ }
2936
+ /** Wilder's ADX (+DI / −DI / ADX) over `period` (default 14). */
2937
+ declare function adx(high: ArrayLike<number>, low: ArrayLike<number>, close: ArrayLike<number>, period?: number): Adx;
2938
+ interface SuperTrend {
2939
+ trend: Float64Array;
2940
+ direction: Float64Array;
2941
+ }
2942
+ /**
2943
+ * SuperTrend (ATR bands with trend-following flip). `trend` is the line; `direction`
2944
+ * is +1 (up / support below price) or −1 (down / resistance above price).
2945
+ */
2946
+ declare function superTrend(high: ArrayLike<number>, low: ArrayLike<number>, close: ArrayLike<number>, period?: number, mult?: number): SuperTrend;
2947
+ interface FibLevel {
2948
+ ratio: number;
2949
+ price: number;
2950
+ }
2951
+ /** Fibonacci retracement price levels between a `high` and `low` (standard ratios). */
2952
+ declare function fibRetracements(high: number, low: number, ratios?: number[]): FibLevel[];
2749
2953
 
2750
2954
  /**
2751
2955
  * Chart-type transforms: turn raw OHLC(V) into the geometry a specialist finance
@@ -2929,9 +3133,499 @@ interface DepthHandle {
2929
3133
  }
2930
3134
  declare function addDepth(plot: Plot, opts: DepthOptions): DepthHandle;
2931
3135
 
3136
+ /**
3137
+ * A tiny dependency-free CSV parser + typed-array column access — the common
3138
+ * "load a CSV and plot a column" path. Handles quoted fields, escaped quotes
3139
+ * (`""`), and `\n` / `\r\n` line endings.
3140
+ */
3141
+ interface CSVOptions {
3142
+ /** Field delimiter. Default `","`. */
3143
+ delimiter?: string;
3144
+ /** Treat the first row as headers. Default `true`. */
3145
+ header?: boolean;
3146
+ /** Drop blank lines. Default `true`. */
3147
+ skipEmpty?: boolean;
3148
+ }
3149
+ /** A parsed CSV: header names + string rows, with typed column accessors. */
3150
+ interface Table {
3151
+ headers: string[];
3152
+ rows: string[][];
3153
+ /** Number of data rows. */
3154
+ readonly length: number;
3155
+ /** A column's raw string values (by name or index). */
3156
+ column(name: string | number): string[];
3157
+ /** A column parsed to a `Float64Array` (non-numeric cells become `NaN`). */
3158
+ numeric(name: string | number): Float64Array;
3159
+ }
3160
+ /** Parse CSV text into a {@link Table}. */
3161
+ declare function parseCSV(text: string, opts?: CSVOptions): Table;
3162
+
3163
+ /**
3164
+ * Largest-Triangle-Three-Buckets (LTTB) downsampling — reduce a series to
3165
+ * `threshold` points while preserving its visual shape (peaks/troughs), the
3166
+ * standard technique for plotting very long line series. First and last points
3167
+ * are always kept.
3168
+ */
3169
+ declare function lttb(x: ArrayLike<number>, y: ArrayLike<number>, threshold: number): {
3170
+ x: Float64Array;
3171
+ y: Float64Array;
3172
+ };
3173
+
3174
+ /**
3175
+ * Squarified treemap — a pure layout plus a {@link Plot} builder that composes
3176
+ * the existing {@link PatchesLayer} (one rect patch per item) and a centered
3177
+ * label annotation per cell. Import from `@photonviz/core`.
3178
+ */
3179
+
3180
+ /** A weighted item to lay into the treemap. */
3181
+ interface TreemapItem {
3182
+ label: string;
3183
+ value: number;
3184
+ /** Explicit fill; otherwise a palette color is cycled by index. */
3185
+ color?: string;
3186
+ }
3187
+ /** A laid-out cell: the input item plus its axis-aligned rect `[x0,y0]`–`[x1,y1]`. */
3188
+ interface TreemapCell {
3189
+ label: string;
3190
+ value: number;
3191
+ color?: string;
3192
+ x0: number;
3193
+ y0: number;
3194
+ x1: number;
3195
+ y1: number;
3196
+ }
3197
+ /** The rectangle the layout fills. */
3198
+ interface TreemapExtent {
3199
+ x: [number, number];
3200
+ y: [number, number];
3201
+ }
3202
+ /** tab10-ish default palette, cycled by index for items without a color. */
3203
+ declare const TREEMAP_PALETTE: readonly string[];
3204
+ /**
3205
+ * Squarified treemap layout: sizes rects ∝ `value`, packing them into `extent`
3206
+ * with aspect ratios kept near 1. Pure — no side effects. Zero/negative values
3207
+ * and empty input yield no cells.
3208
+ */
3209
+ declare function treemapLayout(items: readonly TreemapItem[], extent?: TreemapExtent): TreemapCell[];
3210
+ interface TreemapOptions {
3211
+ items: TreemapItem[];
3212
+ extent?: TreemapExtent;
3213
+ /** Palette cycled by index for items lacking a `color`. Defaults to {@link TREEMAP_PALETTE}. */
3214
+ colors?: string[];
3215
+ opacity?: number;
3216
+ name?: string;
3217
+ renderType?: RenderType;
3218
+ /** Draw a centered label per cell (tiny cells are skipped). Default true. */
3219
+ labels?: boolean;
3220
+ }
3221
+ /**
3222
+ * Add a squarified treemap: one filled rect {@link Patch} per item plus centered
3223
+ * labels. Composes {@link Plot.addPatches} — low-risk, no new layer type.
3224
+ */
3225
+ declare function addTreemap(plot: Plot, opts: TreemapOptions): PatchesLayer;
3226
+
3227
+ /**
3228
+ * Funnel chart — a pure layout plus a {@link Plot} builder that composes the
3229
+ * existing {@link PatchesLayer} (one centered trapezoid per stage) with a
3230
+ * centered label per stage. Import from `@photonviz/core`.
3231
+ */
3232
+
3233
+ /** One funnel stage: a labeled weighted value. */
3234
+ interface FunnelItem {
3235
+ label: string;
3236
+ value: number;
3237
+ /** Explicit fill; otherwise a palette color is cycled by index. */
3238
+ color?: string;
3239
+ }
3240
+ /** A laid-out stage: the input item plus its trapezoid polygon ring. */
3241
+ interface FunnelStage {
3242
+ label: string;
3243
+ value: number;
3244
+ color?: string;
3245
+ /** Closed polygon ring (4 corners) in data space. */
3246
+ poly: {
3247
+ x: number[];
3248
+ y: number[];
3249
+ };
3250
+ }
3251
+ interface FunnelLayoutOptions {
3252
+ /** Full plot width the largest stage spans. Default 1 (extent `[-0.5, 0.5]`). */
3253
+ width?: number;
3254
+ /** Total stack height. Default 1 (extent `[0, 1]`, top stage first). */
3255
+ height?: number;
3256
+ /** Bottom width of the last stage as a fraction of its value width. Default 0.4. */
3257
+ neck?: number;
3258
+ }
3259
+ /** tab10-ish default palette, cycled by index for stages without a color. */
3260
+ declare const FUNNEL_PALETTE: readonly string[];
3261
+ /**
3262
+ * Funnel layout: centered trapezoids stacked top-to-bottom, each stage's top
3263
+ * width ∝ its value and bottom width ∝ the next value (the last stage tapers to
3264
+ * a `neck` fraction of its own width). Pure — no side effects.
3265
+ */
3266
+ declare function funnelLayout(items: readonly FunnelItem[], opts?: FunnelLayoutOptions): FunnelStage[];
3267
+ interface FunnelOptions {
3268
+ items: FunnelItem[];
3269
+ width?: number;
3270
+ height?: number;
3271
+ neck?: number;
3272
+ /** Palette cycled by index for stages lacking a `color`. Defaults to {@link FUNNEL_PALETTE}. */
3273
+ colors?: string[];
3274
+ opacity?: number;
3275
+ name?: string;
3276
+ renderType?: RenderType;
3277
+ /** Draw a centered label per stage. Default true. */
3278
+ labels?: boolean;
3279
+ }
3280
+ /**
3281
+ * Add a funnel chart: one filled trapezoid {@link Patch} per stage plus centered
3282
+ * labels. Composes {@link Plot.addPatches} — low-risk, no new layer type.
3283
+ */
3284
+ declare function addFunnel(plot: Plot, opts: FunnelOptions): PatchesLayer;
3285
+
3286
+ /**
3287
+ * Sunburst (radial icicle) builder. Renders a hierarchy as concentric annular
3288
+ * sectors — one ring per depth, angular span ∝ summed leaf value — by
3289
+ * tessellating each sector into a polygon {@link Patch} ring. Pure
3290
+ * {@link sunburstLayout} does the math; {@link addSunburst} composes the
3291
+ * existing {@link PatchesLayer}. Import from `@photonviz/core`.
3292
+ */
3293
+
3294
+ /** A node in the input hierarchy; `value` counts only for leaves. */
3295
+ interface SunburstNode {
3296
+ name: string;
3297
+ value?: number;
3298
+ color?: string;
3299
+ children?: SunburstNode[];
3300
+ }
3301
+ /** Tunables for {@link sunburstLayout}. */
3302
+ interface SunburstLayoutOptions {
3303
+ /** Radial thickness of each depth ring, in data units. Default 1. */
3304
+ ringWidth?: number;
3305
+ /** Inner radius of the depth-0 ring (hole at the center). Default 0. */
3306
+ center?: number;
3307
+ /** Angle of the first sector edge, radians. Default `Math.PI / 2` (12 o'clock). */
3308
+ startAngle?: number;
3309
+ }
3310
+ /** One laid-out sector: angular range `[a0,a1]` (radians) and radial ring `[r0,r1]`. */
3311
+ interface SunburstArc {
3312
+ name: string;
3313
+ depth: number;
3314
+ a0: number;
3315
+ a1: number;
3316
+ r0: number;
3317
+ r1: number;
3318
+ color?: string;
3319
+ }
3320
+ /**
3321
+ * Lay a hierarchy out into flat annular sectors. Angular span is proportional to
3322
+ * summed leaf value; each depth occupies its own radius ring. Side-effect-free.
3323
+ */
3324
+ declare function sunburstLayout(root: SunburstNode, opts?: SunburstLayoutOptions): SunburstArc[];
3325
+ /** Options for {@link addSunburst}. */
3326
+ interface SunburstOptions {
3327
+ root: SunburstNode;
3328
+ /** Radial thickness of each depth ring, in data units. Default 1. */
3329
+ ringWidth?: number;
3330
+ /** Explicit palette, cycled by node index. Falls back to a built-in palette. */
3331
+ colors?: string[];
3332
+ /** Fill opacity, 0..1. Default 1. */
3333
+ opacity?: number;
3334
+ name?: string;
3335
+ /** Buffer-usage hint; set `"dynamic"` when streaming. Default `"static"`. */
3336
+ renderType?: RenderType;
3337
+ }
3338
+ /**
3339
+ * Build a sunburst from a hierarchy and add it as a {@link PatchesLayer} centered
3340
+ * at (0,0). Set the plot's `equalAspect: true` so the rings stay circular.
3341
+ */
3342
+ declare function addSunburst(plot: Plot, opts: SunburstOptions): PatchesLayer;
3343
+
3344
+ /**
3345
+ * Radial gauge builder. Draws a background track arc, a colored value arc over
3346
+ * `[min,max]` mapped to an angular sweep (default 220°, 200°→-20°), and a needle.
3347
+ * Pure {@link gaugeLayout} produces tessellated polygons; {@link addGauge}
3348
+ * composes the existing {@link PatchesLayer}. Import from `@photonviz/core`.
3349
+ */
3350
+
3351
+ /** An annular-sector polygon, tessellated into a single ring. */
3352
+ interface Ring {
3353
+ x: number[];
3354
+ y: number[];
3355
+ }
3356
+ /** A `{value, color}` band; the arc takes the color of the highest one `value` reaches. */
3357
+ interface GaugeThreshold {
3358
+ value: number;
3359
+ color: string;
3360
+ }
3361
+ /** Tunables for {@link gaugeLayout}. */
3362
+ interface GaugeLayoutOptions {
3363
+ value: number;
3364
+ /** Value at the start of the sweep. Default 0. */
3365
+ min?: number;
3366
+ /** Value at the end of the sweep. Default 100. */
3367
+ max?: number;
3368
+ /** Angle of the sweep start, degrees. Default 200. */
3369
+ startAngle?: number;
3370
+ /** Angle of the sweep end, degrees. Default -20. */
3371
+ endAngle?: number;
3372
+ /** Outer radius, data units. Default 1. */
3373
+ radius?: number;
3374
+ /** Inner (track) radius, data units. Default 0.7. */
3375
+ innerRadius?: number;
3376
+ }
3377
+ /**
3378
+ * Compute the gauge geometry: a full background sector, a value sector clamped to
3379
+ * `[min,max]`, and a thin needle triangle from the center to the value angle.
3380
+ * Angles sweep from `startAngle` to `endAngle` (degrees). Side-effect-free.
3381
+ */
3382
+ declare function gaugeLayout(opts: GaugeLayoutOptions): {
3383
+ bg: Ring;
3384
+ value: Ring;
3385
+ needle: {
3386
+ x: number[];
3387
+ y: number[];
3388
+ };
3389
+ };
3390
+ /** Options for {@link addGauge}. */
3391
+ interface GaugeOptions {
3392
+ value: number;
3393
+ /** Value at the start of the sweep. Default 0. */
3394
+ min?: number;
3395
+ /** Value at the end of the sweep. Default 100. */
3396
+ max?: number;
3397
+ /** `{value,color}` bands; the value arc takes the color of the highest one reached. */
3398
+ thresholds?: GaugeThreshold[];
3399
+ /** Value-arc color when no thresholds apply. Default blue. */
3400
+ color?: string;
3401
+ /** Background-track color. Default a muted gray. */
3402
+ trackColor?: string;
3403
+ /** Angle of the sweep start, degrees. Default 200. */
3404
+ startAngle?: number;
3405
+ /** Angle of the sweep end, degrees. Default -20. */
3406
+ endAngle?: number;
3407
+ /** Needle color. Default a dark slate. */
3408
+ needleColor?: string;
3409
+ /** Center label text; defaults to the numeric value. Pass `false` to omit. */
3410
+ label?: string | false;
3411
+ name?: string;
3412
+ /** Buffer-usage hint; set `"dynamic"` when streaming. Default `"static"`. */
3413
+ renderType?: RenderType;
3414
+ }
3415
+ /**
3416
+ * Build a radial gauge (track + value arc + needle) and add it as a
3417
+ * {@link PatchesLayer} centered at (0,0), with an optional center label.
3418
+ * Set the plot's `equalAspect: true` so it stays circular.
3419
+ */
3420
+ declare function addGauge(plot: Plot, opts: GaugeOptions): PatchesLayer;
3421
+
3422
+ /** A node: a display `name` and an optional explicit fill `color`. */
3423
+ interface SankeyNode {
3424
+ name: string;
3425
+ color?: string;
3426
+ }
3427
+ /** A flow from node index `source` to node index `target` carrying `value`. */
3428
+ interface SankeyLink {
3429
+ source: number;
3430
+ target: number;
3431
+ value: number;
3432
+ }
3433
+ /** Tuning for the pure {@link sankeyLayout}. All in normalized-extent units. */
3434
+ interface SankeyLayoutOptions {
3435
+ /** Drawing box. Defaults to x `[0,1]`, y `[0,1]`. */
3436
+ extent?: {
3437
+ x?: Range;
3438
+ y?: Range;
3439
+ };
3440
+ /** Node rectangle width along x. Default 0.02. */
3441
+ nodeWidth?: number;
3442
+ /** Vertical gap between stacked nodes, as a fraction of the y extent. Default 0.02. */
3443
+ nodePadding?: number;
3444
+ }
3445
+ /** One laid-out node rectangle, keyed by node index `i`. */
3446
+ interface SankeyNodeRect {
3447
+ i: number;
3448
+ x0: number;
3449
+ y0: number;
3450
+ x1: number;
3451
+ y1: number;
3452
+ }
3453
+ /** One laid-out ribbon polygon (closed ring), keyed by link index. */
3454
+ interface SankeyRibbon {
3455
+ link: number;
3456
+ x: number[];
3457
+ y: number[];
3458
+ }
3459
+ /** Result of {@link sankeyLayout}: node rectangles and link ribbons. */
3460
+ interface SankeyLayoutResult {
3461
+ nodeRects: SankeyNodeRect[];
3462
+ ribbons: SankeyRibbon[];
3463
+ }
3464
+ /**
3465
+ * Pure, side-effect-free Sankey layout. Assigns each node a layer by longest
3466
+ * path from the sources, stacks nodes vertically by throughput, and traces each
3467
+ * link as a bezier ribbon between its source and target edges.
3468
+ */
3469
+ declare function sankeyLayout(nodes: SankeyNode[], links: SankeyLink[], opts?: SankeyLayoutOptions): SankeyLayoutResult;
3470
+ /** Options for {@link addSankey}. */
3471
+ interface SankeyOptions {
3472
+ nodes: SankeyNode[];
3473
+ links: SankeyLink[];
3474
+ /** Drawing box in data space. Defaults to x `[0,1]`, y `[0,1]`. */
3475
+ extent?: {
3476
+ x?: Range;
3477
+ y?: Range;
3478
+ };
3479
+ nodeWidth?: number;
3480
+ nodePadding?: number;
3481
+ /** Per-node colors (by index); overridden by a node's own `color`. */
3482
+ colors?: string[];
3483
+ /** Layer fill opacity (0..1), forwarded to the patches layer. Default 1. */
3484
+ opacity?: number;
3485
+ name?: string;
3486
+ renderType?: RenderType;
3487
+ /** Draw node name labels. Default true. */
3488
+ labels?: boolean;
3489
+ }
3490
+ /**
3491
+ * Build a Sankey diagram on `plot`: one node rectangle {@link Patch} per node
3492
+ * plus one semi-transparent ribbon patch per link (colored from its source
3493
+ * node), added as a single {@link PatchesLayer}. Node name labels are added as
3494
+ * plot annotations unless `labels` is false.
3495
+ */
3496
+ declare function addSankey(plot: Plot, opts: SankeyOptions): PatchesLayer;
3497
+
3498
+ /**
3499
+ * Chord diagram — a pure circular layout plus a {@link Plot} builder that composes
3500
+ * the existing {@link PatchesLayer}: thin annular sectors for the group arcs and
3501
+ * bezier-bounded ribbons for the flows between groups, with labels outside each
3502
+ * arc. Import from `@photonviz/core`. Use `equalAspect: true` so it stays circular.
3503
+ */
3504
+
3505
+ /** tab10-ish default palette, cycled by group index. */
3506
+ declare const CHORD_PALETTE: readonly string[];
3507
+ /** A laid-out group arc as a closed ring of `x`/`y` (thin annular sector). */
3508
+ interface ChordGroupArc {
3509
+ i: number;
3510
+ x: number[];
3511
+ y: number[];
3512
+ }
3513
+ /** A laid-out ribbon between groups `i` and `j` as a closed ring of `x`/`y`. */
3514
+ interface ChordRibbon {
3515
+ i: number;
3516
+ j: number;
3517
+ x: number[];
3518
+ y: number[];
3519
+ }
3520
+ /** The result of {@link chordLayout}: outer group arcs plus inter-group ribbons. */
3521
+ interface ChordLayoutResult {
3522
+ groupArcs: ChordGroupArc[];
3523
+ ribbons: ChordRibbon[];
3524
+ }
3525
+ /** Tunable geometry for {@link chordLayout}. */
3526
+ interface ChordLayoutOptions {
3527
+ /** Outer radius of the group arcs. Default 1. */
3528
+ radius?: number;
3529
+ /** Total angular gap (radians) split evenly between groups. Default 0.1·2π. */
3530
+ padAngle?: number;
3531
+ /** Thickness of the outer arc as a fraction of `radius`. Default 0.06. */
3532
+ arcWidth?: number;
3533
+ /** Points sampled along each connecting bezier edge of a ribbon. Default 24. */
3534
+ samples?: number;
3535
+ }
3536
+ /**
3537
+ * Chord layout: groups sit around a circle with angular span ∝ their row-sum
3538
+ * (standard chord convention), separated by `padAngle`. Each group's arc is
3539
+ * sub-divided per target `j`; a ribbon between `i` and `j` is bounded by the two
3540
+ * matching sub-arcs and closed by quadratic beziers curving through the center.
3541
+ * Pure — no side effects. Empty/zero-flow input yields empty arrays.
3542
+ */
3543
+ declare function chordLayout(matrix: number[][], opts?: ChordLayoutOptions): ChordLayoutResult;
3544
+ interface ChordOptions {
3545
+ /** Square flow matrix; `matrix[i][j]` is the flow from group `i` to group `j`. */
3546
+ matrix: number[][];
3547
+ /** Optional group labels, placed just outside each arc. */
3548
+ labels?: string[];
3549
+ /** Outer radius. Default 1. */
3550
+ radius?: number;
3551
+ /** Palette cycled by group index. Defaults to {@link CHORD_PALETTE}. */
3552
+ colors?: string[];
3553
+ /** Ribbon fill opacity, 0..1. Default 0.65. */
3554
+ opacity?: number;
3555
+ name?: string;
3556
+ renderType?: RenderType;
3557
+ }
3558
+ /**
3559
+ * Add a chord diagram: opaque per-group outer arcs plus semi-transparent ribbons
3560
+ * (colored by their source group) as {@link Patch}es, with labels outside each
3561
+ * arc. Composes {@link Plot.addPatches} — set `equalAspect: true` on the plot.
3562
+ */
3563
+ declare function addChord(plot: Plot, opts: ChordOptions): PatchesLayer;
3564
+
3565
+ /**
3566
+ * Parallel coordinates — a pure per-dimension normalization plus a {@link Plot}
3567
+ * builder that composes existing {@link LineLayer}s: one polyline per row crossing
3568
+ * N vertical axes, each axis drawn as a `span` guide with a name label on top.
3569
+ * Import from `@photonviz/core`.
3570
+ */
3571
+
3572
+ /** tab10-ish default palette, cycled by row index (or by `colorBy` band). */
3573
+ declare const PARALLEL_PALETTE: readonly string[];
3574
+ /** A laid-out axis: its dimension name, x position, and observed value range. */
3575
+ interface ParallelAxis {
3576
+ dim: string;
3577
+ x: number;
3578
+ min: number;
3579
+ max: number;
3580
+ }
3581
+ /** A laid-out row as a polyline of N points (one per dimension). */
3582
+ interface ParallelLine {
3583
+ row: number;
3584
+ x: number[];
3585
+ y: number[];
3586
+ }
3587
+ /** The result of {@link parallelLayout}: axis metadata plus per-row polylines. */
3588
+ interface ParallelLayoutResult {
3589
+ axes: ParallelAxis[];
3590
+ lines: ParallelLine[];
3591
+ }
3592
+ /**
3593
+ * Parallel-coordinates layout: axis `i` sits at `x = i`; each dimension's values
3594
+ * are normalized to `y ∈ [0,1]` by its own min/max (a flat dimension maps to 0.5).
3595
+ * Each row becomes an N-point polyline. Pure — no side effects. Non-finite values
3596
+ * fall back to the axis midpoint.
3597
+ */
3598
+ declare function parallelLayout(dimensions: string[], rows: number[][]): ParallelLayoutResult;
3599
+ interface ParallelOptions {
3600
+ /** One name per axis, left to right. */
3601
+ dimensions: string[];
3602
+ /** Data rows, each parallel to `dimensions`. */
3603
+ rows: number[][];
3604
+ /** Optional per-row value mapped through a palette ramp for coloring. */
3605
+ colorBy?: number[];
3606
+ /** Palette cycled by row index (or banded by `colorBy`). Defaults to {@link PARALLEL_PALETTE}. */
3607
+ colors?: string[];
3608
+ /** Polyline width in px. Default 1. */
3609
+ width?: number;
3610
+ /** Line opacity, 0..1. Default 0.7. */
3611
+ opacity?: number;
3612
+ name?: string;
3613
+ renderType?: RenderType;
3614
+ }
3615
+ /** The layers created by {@link addParallelCoordinates}: one {@link LineLayer} per row. */
3616
+ interface ParallelHandle {
3617
+ lines: LineLayer[];
3618
+ }
3619
+ /**
3620
+ * Add a parallel-coordinates plot: each row as a {@link Plot.addLine} polyline
3621
+ * (colored via `colorBy` ramp or a cycled palette), each axis as a vertical
3622
+ * `span` guide, plus a dimension-name label at the top of every axis.
3623
+ */
3624
+ declare function addParallelCoordinates(plot: Plot, opts: ParallelOptions): ParallelHandle;
3625
+
2932
3626
  /** Parse a CSS hex/rgb color string into normalized RGBA (0..1). */
2933
3627
  declare function parseColor(input: string): [number, number, number, number];
2934
3628
  /** Normalized RGBA (0..1) back to a CSS `rgba(...)` string. */
2935
3629
  declare function toColorCss(c: readonly [number, number, number, number]): string;
2936
3630
 
2937
- export { type Annotation, AreaLayer, type AreaOptions, type AreaSeries, Axis, type AxisConfig, type AxisFrame, type AxisScaleOptions, Bar3DLayer, type Bar3DOptions, BarLayer, type BarOptions, type BarSeries, type BollingerBands, type BollingerHandle, type BollingerOptions, type Bounds, type Bounds3, type BoxGroup, BoxLayer, type BoxOptions, type BoxStats, type Brick, type Candle, type CandlestickData, CandlestickLayer, type CandlestickOptions, CategoricalScale, type Color, type ColorInfo, type ColormapName, Contour3DLayer, type Contour3DOptions, ContourLayer, type ContourOptions, type Density, type DepthCurves, type DepthHandle, type DepthOptions, type Dim, type DrawState, ErrorBarLayer, type ErrorBarOptions, type ForceLayoutOptions, type GraphInput, GraphLayer, type GraphOptions, type GroupedBarOptions, HeatmapLayer, type HeatmapOptions, type HeikinAshiOptions, HexbinLayer, type HexbinOptions, type Histogram, type HoverReadoutRow, ImageLayer, type ImageOptions, type ImageSource, type InteractionMode, IsosurfaceLayer, type IsosurfaceOptions, type Layer, type Layer3D, type Layout, type LegendOptions, Line3DLayer, type Line3DOptions, LineLayer, type LineOptions, LinearScale, LogScale, type Macd, type MarkerShape, type Ohlc, type OhlcArrays, type OhlcInput, OhlcLayer, type OhlcOptions, OrdinalTimeScale, type Patch, PatchesLayer, type PatchesOptions, type PfColumn, type PickMode, PieLayer, type PieOptions, Plot, Plot3D, type Plot3DOptions, type PlotOptions, type PlotTitleOptions, PointCloudLayer, type PointCloudOptions, type PolarLineOptions, type PolarOptions, PolarPlot, type PolarScatterOptions, type PolarSeries, Quiver3DLayer, type Quiver3DOptions, QuiverLayer, type QuiverOptions, type RGB, type Range, type RenderType, type RenkoOptions, type ResolvedAxisStyle, type Scale, type ScaleType, ScatterLayer, type ScatterOptions, type Spectrogram, type StackedAreaOptions, type StackedBarOptions, StemLayer, type StemOptions, SurfaceLayer, type SurfaceOptions, TRANSFORM_GLSL, TRANSFORM_UNIFORMS, type Theme, type Tick, type TicksSpec, TimeScale, type ToolbarHost, type ToolbarTheme, VolumeLayer, type VolumeOptions, type VolumeProfile, type VolumeProfileOptions, type YAxisOptions, addBollinger, addDepth, addHeikinAshi, addRenko, addVolumeProfile, atr, autoTicks, bollinger, boxStats, bufferUsage, colormap, colormapLUT, createProgram, createToolbar, darkTheme, defaultFormat, depth, earcut, ema, fft, firstFinite, forceLayout, heikinAshi, histogram, kde, lightTheme, lineBreak, linkX, macd, makeScale, marchingCubes, parseColor, pointAndFigure, quantileSorted, renko, resolveAxisStyle, resolveTicks, rollingStd, rsi, setTransformUniforms, sma, spectrogram, toColorCss, trueRange, uniformLocations, volumeProfile, vwap, withMinorTicks, wma };
3631
+ export { type Adx, type Annotation, AreaLayer, type AreaOptions, type AreaSeries, Axis, type AxisConfig, type AxisFrame, type AxisScaleOptions, Bar3DLayer, type Bar3DOptions, BarLayer, type BarOptions, type BarSeries, type BollingerBands, type BollingerHandle, type BollingerOptions, type Bounds, type Bounds3, type BoxGroup, BoxLayer, type BoxOptions, type BoxStats, type Brick, CHORD_PALETTE, type CSVOptions, type Candle, type CandlestickData, CandlestickLayer, type CandlestickOptions, CategoricalScale, type Channel, type ChordGroupArc, type ChordLayoutOptions, type ChordLayoutResult, type ChordOptions, type ChordRibbon, type Color, type ColorInfo, type ColormapName, Contour3DLayer, type Contour3DOptions, ContourLayer, type ContourOptions, type Density, type DepthCurves, type DepthHandle, type DepthOptions, type Dim, type DrawState, type DrawTool, ErrorBarLayer, type ErrorBarOptions, type ExportOptions, FUNNEL_PALETTE, type FibLevel, type ForceLayoutOptions, type FunnelItem, type FunnelLayoutOptions, type FunnelOptions, type FunnelStage, type GaugeLayoutOptions, type GaugeOptions, type GaugeThreshold, type GraphInput, GraphLayer, type GraphOptions, type GroupedBarOptions, HeatmapLayer, type HeatmapOptions, type HeikinAshiOptions, HexbinLayer, type HexbinOptions, type Histogram, type HoverReadoutRow, type Ichimoku, ImageLayer, type ImageOptions, type ImageSource, type InteractionMode, IsosurfaceLayer, type IsosurfaceOptions, type Layer, type Layer3D, type Layout, type LegendOptions, Line3DLayer, type Line3DOptions, LineLayer, type LineOptions, LinearScale, LogScale, type Macd, type MarkerShape, type Ohlc, type OhlcArrays, type OhlcInput, OhlcLayer, type OhlcOptions, OrdinalTimeScale, PARALLEL_PALETTE, type ParallelAxis, type ParallelHandle, type ParallelLayoutResult, type ParallelLine, type ParallelOptions, type Patch, PatchesLayer, type PatchesOptions, type PfColumn, type PickMode, PieLayer, type PieOptions, Plot, Plot3D, type Plot3DOptions, type PlotOptions, type PlotTitleOptions, PointCloudLayer, type PointCloudOptions, type PolarLineOptions, type PolarOptions, PolarPlot, type PolarScatterOptions, type PolarSeries, Quiver3DLayer, type Quiver3DOptions, QuiverLayer, type QuiverOptions, type RGB, type Range, type RenderType, type RenkoOptions, type ResolvedAxisStyle, type Ring, type SankeyLayoutOptions, type SankeyLayoutResult, type SankeyLink, type SankeyNode, type SankeyNodeRect, type SankeyOptions, type SankeyRibbon, type Scale, type ScaleType, ScatterLayer, type ScatterOptions, type Spectrogram, type StackedAreaOptions, type StackedBarOptions, StemLayer, type StemOptions, type Stochastic, type SunburstArc, type SunburstLayoutOptions, type SunburstNode, type SunburstOptions, type SuperTrend, SurfaceLayer, type SurfaceOptions, TRANSFORM_GLSL, TRANSFORM_UNIFORMS, TREEMAP_PALETTE, type Table, type Theme, type Tick, type TicksSpec, TimeScale, type ToolbarHost, type ToolbarTheme, type TreemapCell, type TreemapExtent, type TreemapItem, type TreemapOptions, VolumeLayer, type VolumeOptions, type VolumeProfile, type VolumeProfileOptions, type YAxisOptions, addBollinger, addChord, addDepth, addFunnel, addGauge, addHeikinAshi, addParallelCoordinates, addRenko, addSankey, addSunburst, addTreemap, addVolumeProfile, adx, atr, autoTicks, bollinger, boxStats, bufferUsage, canvasToBlob, chordLayout, colormap, colormapLUT, copyCanvasToClipboard, createProgram, createToolbar, darkTheme, defaultFormat, depth, downloadCanvas, earcut, ema, fft, fibRetracements, firstFinite, forceLayout, funnelLayout, gaugeLayout, heikinAshi, histogram, ichimoku, kde, keltner, lightTheme, lineBreak, linkX, lttb, macd, makeScale, marchingCubes, obv, parallelLayout, parseCSV, parseColor, pointAndFigure, quantileSorted, renko, resolveAxisStyle, resolveTicks, rollingStd, rsi, sankeyLayout, setTransformUniforms, sma, spectrogram, stochastic, sunburstLayout, superTrend, toColorCss, treemapLayout, trueRange, uniformLocations, volumeProfile, vwap, withMinorTicks, wma };