hyperprop-charting-library 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/README.md +48 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # hyperprop-charting-library
2
+
3
+ Lightweight TypeScript charting library with Canvas rendering, OHLC candles, axes, crosshair, price/order overlays, and interaction callbacks.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install hyperprop-charting-library
9
+ ```
10
+
11
+ ## Quick start
12
+
13
+ ```ts
14
+ import { createChart, type OhlcDataPoint } from "hyperprop-charting-library";
15
+
16
+ const el = document.getElementById("chart");
17
+ if (!el) throw new Error("Missing chart container");
18
+
19
+ const chart = createChart(el, {
20
+ width: 900,
21
+ height: 520,
22
+ backgroundColor: "#101114",
23
+ upColor: "#2fb171",
24
+ downColor: "#d35a5a"
25
+ });
26
+
27
+ const data: OhlcDataPoint[] = [
28
+ { t: "2026-01-01T00:00:00.000Z", o: 100, h: 104, l: 98, c: 102 },
29
+ { t: "2026-01-02T00:00:00.000Z", o: 102, h: 106, l: 101, c: 105 }
30
+ ];
31
+
32
+ chart.setData(data);
33
+ ```
34
+
35
+ ## Core API
36
+
37
+ - `createChart(element, options)`
38
+ - `chart.setData(data)`
39
+ - `chart.setPriceLines(lines)` / `chart.addPriceLine(line)` / `chart.removePriceLine(id)`
40
+ - `chart.setOrderLines(lines)` / `chart.addOrderLine(line)` / `chart.updateOrderLine(id, patch)` / `chart.removeOrderLine(id)`
41
+ - `chart.onOrderAction(handler)` / `chart.onChartClick(handler)`
42
+ - `chart.setDoubleClickEnabled(enabled)` / `chart.setDoubleClickAction(action)`
43
+ - `chart.resize(width, height)` / `chart.destroy()`
44
+
45
+ ## Notes
46
+
47
+ - Package is framework-agnostic (plain DOM + Canvas).
48
+ - Playground/demo UI is not part of the npm package runtime API.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hyperprop-charting-library",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Lightweight TypeScript charting core",
5
5
  "type": "module",
6
6
  "main": "./dist/hyperprop-charting-library.cjs",