openalgo-charts 1.0.20 → 1.0.22

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.20";
2
+ declare const VERSION = "1.0.22";
3
3
  /** Returns the current library version. */
4
4
  declare function version(): string;
5
5
 
@@ -1724,10 +1724,18 @@ interface ChartOptions {
1724
1724
  priceAxisWidth?: number;
1725
1725
  timeAxisHeight?: number;
1726
1726
  /**
1727
- * Where indicator legend rows start inside a pane, in media px. A host that
1728
- * draws its own overlay in the top-left corner — an OHLC readout, a symbol
1729
- * line — needs to push these clear of it, or the rows land underneath and
1730
- * their settings / close buttons become invisible and unclickable.
1727
+ * Where indicator legend rows start inside **one** pane, in media px. A host
1728
+ * that draws its own overlay in a pane's top-left corner — an OHLC readout, a
1729
+ * symbol line, a trade panel — needs to push these clear of it, or the rows
1730
+ * land underneath and their settings / close buttons become invisible and
1731
+ * unclickable.
1732
+ *
1733
+ * It follows whichever pane currently renders at that corner, which is
1734
+ * normally pane 0 — but maximizing a lower pane parks the others at a
1735
+ * placeholder weight, so the maximized pane moves into the same corner and
1736
+ * inherits the offset. Every other pane keeps the default corner, because a
1737
+ * short lower pane would have its legend pushed off it entirely.
1738
+ *
1731
1739
  * Defaults to `{ top: 6, left: 8 }`.
1732
1740
  */
1733
1741
  legendOffset?: {
@@ -2078,6 +2086,19 @@ declare class Chart {
2078
2086
  * the gap instead of leaving a hole where it used to sit.
2079
2087
  */
2080
2088
  private _restackLegends;
2089
+ /**
2090
+ * Apply `legendOffset` to whichever pane currently renders at the chart's
2091
+ * top-left, rather than a fixed index.
2092
+ *
2093
+ * The offset describes a region of the *chart* the host has covered with its
2094
+ * own overlay — a symbol line, an OHLC readout. Normally that is pane 0, but
2095
+ * maximizing a lower pane parks the others at a placeholder weight, so the
2096
+ * maximized pane ends up rendering in that same corner. Pinning the offset to
2097
+ * pane 0 left it drawing its legend straight through the host's readout.
2098
+ *
2099
+ * Host-added legend rows are left alone: the host positions its own.
2100
+ */
2101
+ private _syncLegendOffsets;
2081
2102
  /** A host for the (lazy-loaded) trade layer to attach/detach its primitives on a pane. */
2082
2103
  tradeHost(paneIndex?: number): {
2083
2104
  addPrimitive(p: IPrimitive): void;