openalgo-charts 1.0.14 → 1.0.16

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
@@ -1,5 +1,5 @@
1
1
  /** Library version string. Matches package.json (published npm release). */
2
- declare const VERSION = "1.0.14";
2
+ declare const VERSION = "1.0.16";
3
3
  /** Returns the current library version. */
4
4
  declare function version(): string;
5
5
 
@@ -1653,6 +1653,17 @@ interface ChartOptions {
1653
1653
  theme?: ChartTheme;
1654
1654
  priceAxisWidth?: number;
1655
1655
  timeAxisHeight?: number;
1656
+ /**
1657
+ * Where indicator legend rows start inside a pane, in media px. A host that
1658
+ * draws its own overlay in the top-left corner — an OHLC readout, a symbol
1659
+ * line — needs to push these clear of it, or the rows land underneath and
1660
+ * their settings / close buttons become invisible and unclickable.
1661
+ * Defaults to `{ top: 6, left: 8 }`.
1662
+ */
1663
+ legendOffset?: {
1664
+ top?: number;
1665
+ left?: number;
1666
+ };
1656
1667
  /**
1657
1668
  * Crosshair behaviour. 'normal' (default) — the cross follows the pointer
1658
1669
  * exactly. 'magnet' — the horizontal line snaps to the nearest O/H/L/C of the
@@ -1815,6 +1826,8 @@ declare class Chart {
1815
1826
  private _pointerMoved;
1816
1827
  /** While true, pointer gestures place anchors instead of panning. */
1817
1828
  private _placementMode;
1829
+ /** Where indicator legend rows start inside a pane (see `legendOffset`). */
1830
+ private readonly _legendOffset;
1818
1831
  private _downPane;
1819
1832
  private _downX;
1820
1833
  private _downLocalY;
@@ -2405,12 +2418,22 @@ interface BuySellButtonsOptions {
2405
2418
  sellLabel?: string;
2406
2419
  /** Show the price line above each label. Default true. */
2407
2420
  showPrices?: boolean;
2421
+ /**
2422
+ * Uniform size multiplier for the whole panel — box, gaps and type. Default 1.
2423
+ * A dense trading layout wants these smaller so they do not crowd the pane's
2424
+ * legend rows. Clamped to 0.6..1.5; below that the labels stop being legible.
2425
+ */
2426
+ scale?: number;
2408
2427
  }
2409
2428
  declare class BuySellButtons implements IPrimitive {
2410
2429
  private readonly _id;
2411
2430
  private readonly _position;
2412
2431
  private readonly _mx;
2413
2432
  private readonly _my;
2433
+ private readonly _scale;
2434
+ private readonly _btnW;
2435
+ private readonly _qtyW;
2436
+ private readonly _h;
2414
2437
  private readonly _buyLabel;
2415
2438
  private readonly _sellLabel;
2416
2439
  private readonly _showPrices;