openalgo-charts 1.0.25 → 1.0.26

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 CHANGED
@@ -102,7 +102,7 @@ draw.setTool('trend-line'); // the next two clicks place it
102
102
  Headless by design — no toolbar, no dialogs. Placement with live preview, selection, whole-shape and per-anchor dragging, magnet snap to O/H/L/C, undo/redo (a drag is one step), and persistence. Anchors are `{ time, price }`, never pixels, so they survive zoom and resolve inside collapsed session gaps and past the last bar.
103
103
 
104
104
  ### Panes & legends
105
- Draggable pane dividers, move / maximize / remove, and TradingView-style pane legends showing one reading per plot in that plot's own colour, with inline show-hide / settings / move / delete controls revealed on hover.
105
+ Draggable pane dividers, move / maximize / remove, and pane legends showing one reading per plot in that plot's own colour, with inline show-hide / settings / move / delete controls revealed on hover.
106
106
 
107
107
  ### Trading
108
108
  Order, position, and bracket lines with live P&L, one-click and drag-to-modify, OCO, validation, an order state machine, analyzer (sandbox) mode, and a depth-of-market ladder (5 to 200 levels).
@@ -145,7 +145,7 @@ cd website && npm install && npm run dev # http://localhost:3000/openalgo-cha
145
145
 
146
146
  ## Examples
147
147
 
148
- Runnable demos in [`examples/`](./examples), including a full **yfinance terminal** ([`examples/yfinance`](./examples/yfinance)) with a TradingView-style shell: symbol search, interval pills, chart-type picker, indicator menu, a vertical drawing rail, a floating properties bar, generated indicator settings, and layout persistence.
148
+ Runnable demos in [`examples/`](./examples), including a full **yfinance terminal** ([`examples/yfinance`](./examples/yfinance)) with a full terminal shell: symbol search, interval pills, chart-type picker, indicator menu, a vertical drawing rail, a floating properties bar, generated indicator settings, and layout persistence.
149
149
 
150
150
  ```bash
151
151
  npm run build
package/dist/index.d.ts CHANGED
@@ -128,6 +128,14 @@ declare const DEFAULT_PRICE_SCALE_OPTIONS: PriceScaleOptions;
128
128
  /**
129
129
  * Pure: compute a price range from data extremes plus top/bottom margins.
130
130
  * Returns a padded [min,max]; widens a degenerate (flat) range so it's drawable.
131
+ *
132
+ * The margins are fractions of the **pane height**, so the data band occupies
133
+ * the `1 - marginTop - marginBottom` left between them. Padding the data span
134
+ * by the margin instead — which is what this did — makes the reserved space
135
+ * depend on how tall the data happens to be: an overlay asking for `0.82` to
136
+ * sit in the bottom 18% got `high + 0.82 * span`, leaving its bars 55% of the
137
+ * pane. The difference only shows at large margins; at the 0.1 default the two
138
+ * readings land within a few percent of each other.
131
139
  */
132
140
  declare function autoscaleRange(low: number, high: number, marginTop: number, marginBottom: number): PriceRange;
133
141
  declare class PriceScale {
@@ -1061,7 +1069,7 @@ declare class PriceLine implements IPrimitive {
1061
1069
  }
1062
1070
 
1063
1071
  /**
1064
- * Pane legend (ARCHITECTURE.md §8) — the TradingView-style row at the top-left
1072
+ * Pane legend (ARCHITECTURE.md §8) — the row at the top-left
1065
1073
  * of a pane: a color swatch, the source's name, its parameters, the value under
1066
1074
  * the crosshair, and inline action buttons on the right.
1067
1075
  *
@@ -1808,7 +1816,7 @@ interface ChartOptions {
1808
1816
  */
1809
1817
  timeFormatter?: (utcSeconds: number, tickMark?: TickMarkType) => string;
1810
1818
  /**
1811
- * Hover-revealed zoom / step controls above the time axis (TradingView-style).
1819
+ * Hover-revealed zoom / step controls above the time axis, as terminals show.
1812
1820
  * `true` by default — they stay invisible until the pointer nears the bottom
1813
1821
  * of the chart. Pass `false` to drop them, or an options object to restyle.
1814
1822
  */
@@ -2587,7 +2595,7 @@ declare class LogoWatermark implements IPrimitive {
2587
2595
  }
2588
2596
 
2589
2597
  /**
2590
- * Inline Buy/Sell button panel (ARCHITECTURE.md §9). A TradingView-style trade
2598
+ * Inline Buy/Sell button panel (ARCHITECTURE.md §9). An on-chart trade
2591
2599
  * panel docked inside the plot: a SELL button (bid), a quantity chip, and a BUY
2592
2600
  * button (ask), drawn on the overlay canvas so it stays fixed while the chart
2593
2601
  * pans/zooms. Clicks hit-test to `${id}:sell` / `${id}:buy` / `${id}:qty`, which