hyperprop-charting-library 0.1.128 → 0.1.130
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/hyperprop-charting-library.cjs +439 -62
- package/dist/hyperprop-charting-library.d.ts +26 -1
- package/dist/hyperprop-charting-library.js +439 -62
- package/dist/index.cjs +439 -62
- package/dist/index.d.cts +26 -1
- package/dist/index.d.ts +26 -1
- package/dist/index.js +439 -62
- package/docs/API.md +10 -0
- package/package.json +1 -1
package/docs/API.md
CHANGED
|
@@ -391,6 +391,14 @@ Built-in:
|
|
|
391
391
|
- `"vwap"`: Session-anchored VWAP with optional sigma bands (overlay)
|
|
392
392
|
- `"bollinger"`: Bollinger Bands (overlay)
|
|
393
393
|
- `"macd"`: MACD with signal line and zero-anchored histogram (separate pane; inputs `fast`, `slow`, `signal`, colors)
|
|
394
|
+
|
|
395
|
+
All separate-pane indicators (`macd`, `stochastic`, `stochrsi`, `adx`, `obv`, `mfi`, `cci`, `williamsr`, `roc`, `momentum`, `rsi`, `atr`, `stddev`) also accept `showValueLine: boolean` (default `true`): draws a dotted horizontal line across the pane at each line's latest value, ticker-line style, matching the value tag on the right scale. Toggle it per instance, e.g. `chart.updateIndicator(id, { inputs: { showValueLine: false } })`.
|
|
396
|
+
|
|
397
|
+
Separate panes also get, automatically:
|
|
398
|
+
|
|
399
|
+
- The main chart's grid: vertical time gridlines run through every pane, and each pane draws horizontal gridlines on round values using the same `grid` color/opacity options.
|
|
400
|
+
- Draggable dividers: the border above each pane resizes it (cursor turns to a row-resize handle). Hosts can persist the new height via `onIndicatorPaneHeightChange`.
|
|
401
|
+
- TradingView-style legend controls on hover: eye (hide/show), gear (settings), `{}` (view source), and X (remove). The eye toggles visibility internally — a hidden indicator collapses to a small legend strip instead of disappearing, so it can be un-hidden in place. Gear/source/remove emit `onIndicatorPaneAction` events for the host UI; if no handler is registered, X removes the indicator directly.
|
|
394
402
|
- `"stochastic"`: Stochastic %K/%D with 20/80 guides (separate pane; inputs `kLength`, `kSmoothing`, `dLength`)
|
|
395
403
|
- `"stochrsi"`: Stochastic RSI %K/%D (separate pane; inputs `rsiLength`, `stochLength`, `kSmoothing`, `dSmoothing`)
|
|
396
404
|
- `"adx"`: ADX with optional +DI/-DI lines, Wilder smoothing (separate pane; inputs `length`, `showDi`)
|
|
@@ -497,6 +505,8 @@ Use `getDrawings()` / `setDrawings()` for persistence.
|
|
|
497
505
|
- `onChartClick(handler: ((event: ChartClickEvent) => void) | null): void`
|
|
498
506
|
- `onCrosshairMove(handler: ((event: CrosshairMoveEvent) => void) | null): void`
|
|
499
507
|
- `onCrosshairPriceAction(handler: ((event: CrosshairPriceActionEvent) => void) | null): void`
|
|
508
|
+
- `onIndicatorPaneAction(handler: ((event: IndicatorPaneActionEvent) => void) | null): void` — pane-legend hover buttons. Event: `{ id, type, action: "settings" | "remove" | "source" | "visibility", visible? }`. Open your settings dialog on `"settings"`, a code/definition view on `"source"`, and remove the indicator from your own state on `"remove"`; `"visibility"` is informational (the chart already toggled it).
|
|
509
|
+
- `onIndicatorPaneHeightChange(handler: ((event: IndicatorPaneHeightChangeEvent) => void) | null): void` — pane divider drag-resize. Event: `{ id, paneHeightRatio, dragging }`; persist the ratio when `dragging === false`.
|
|
500
510
|
- `zoomInX(factor?: number): void` (default factor `1.25`)
|
|
501
511
|
- `zoomOutX(factor?: number): void` (default factor `1.25`)
|
|
502
512
|
- `zoomInY(factor?: number): void` (default factor `1.25`)
|