hyperprop-charting-library 0.1.19 → 0.1.21
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 +711 -16
- package/dist/hyperprop-charting-library.d.ts +49 -1
- package/dist/hyperprop-charting-library.js +711 -16
- package/dist/index.cjs +711 -16
- package/dist/index.d.cts +49 -1
- package/dist/index.d.ts +49 -1
- package/dist/index.js +711 -16
- package/docs/API.md +28 -0
- package/package.json +1 -1
package/docs/API.md
CHANGED
|
@@ -61,6 +61,7 @@ Top-level options:
|
|
|
61
61
|
- `orderLines?: OrderLineOptions[]`
|
|
62
62
|
- `tickerLine?: TickerLineOptions`
|
|
63
63
|
- `dashPatterns?: Partial<DashPatternOptions>` (controls dotted/dashed spacing)
|
|
64
|
+
- `indicators?: IndicatorInstanceOptions[]` (initial indicator instances, built-in includes `"volume"`)
|
|
64
65
|
|
|
65
66
|
### `AxisOptions`
|
|
66
67
|
|
|
@@ -238,6 +239,27 @@ Connector/fill visuals:
|
|
|
238
239
|
- `fillToPrice?: number`
|
|
239
240
|
- `fillColor?: string`
|
|
240
241
|
|
|
242
|
+
### `IndicatorInstanceOptions`
|
|
243
|
+
|
|
244
|
+
- `id?: string`
|
|
245
|
+
- `type: string` (registered indicator id, e.g. `"volume"`)
|
|
246
|
+
- `visible?: boolean` (default `true`)
|
|
247
|
+
- `pane?: "overlay" | "separate"`
|
|
248
|
+
- `inputs?: Record<string, unknown>` (plugin-specific parameters)
|
|
249
|
+
|
|
250
|
+
### `IndicatorPlugin`
|
|
251
|
+
|
|
252
|
+
- `id: string`
|
|
253
|
+
- `name: string`
|
|
254
|
+
- `pane?: "overlay" | "separate"` (default `"overlay"`)
|
|
255
|
+
- `paneHeightRatio?: number` (for separate panes)
|
|
256
|
+
- `defaultInputs?: Record<string, unknown>`
|
|
257
|
+
- `draw(ctx, renderContext, inputs): void`
|
|
258
|
+
|
|
259
|
+
Built-in:
|
|
260
|
+
|
|
261
|
+
- `"volume"`: histogram in a bottom separate pane (uses `OhlcDataPoint.v`)
|
|
262
|
+
|
|
241
263
|
---
|
|
242
264
|
|
|
243
265
|
## `ChartInstance` Methods
|
|
@@ -264,5 +286,11 @@ Connector/fill visuals:
|
|
|
264
286
|
- `resetViewport(): void` (fit x + reset y auto-scale)
|
|
265
287
|
- `setDoubleClickEnabled(enabled: boolean): void`
|
|
266
288
|
- `setDoubleClickAction(action: "reset" | "placeLimitOrder"): void`
|
|
289
|
+
- `registerIndicator(plugin: IndicatorPlugin): void`
|
|
290
|
+
- `unregisterIndicator(type: string): void`
|
|
291
|
+
- `addIndicator(type: string, inputs?: Record<string, unknown>, options?: Partial<IndicatorInstanceOptions>): string`
|
|
292
|
+
- `updateIndicator(id: string, patch: Partial<IndicatorInstanceOptions>): void`
|
|
293
|
+
- `removeIndicator(id: string): void`
|
|
294
|
+
- `setIndicators(indicators: IndicatorInstanceOptions[]): void`
|
|
267
295
|
- `resize(width?: number, height?: number): void`
|
|
268
296
|
- `destroy(): void`
|