resolvcharts 0.2.0 → 0.4.0
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 +53 -3
- package/dist/index.cjs +643 -155
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +50 -10
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +50 -10
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +643 -156
- package/dist/index.mjs.map +1 -1
- package/dist/resolvcharts.global.min.js +192 -22
- package/dist/resolvcharts.global.min.js.map +1 -1
- package/dist/series-PmAjztEh.cjs +1191 -0
- package/dist/series-PmAjztEh.cjs.map +1 -0
- package/dist/series-wyqYpkXm.mjs +1191 -0
- package/dist/series-wyqYpkXm.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/series-BdprL87H.mjs +0 -479
- package/dist/series-BdprL87H.mjs.map +0 -1
- package/dist/series-J_5Z6dah.cjs +0 -479
- package/dist/series-J_5Z6dah.cjs.map +0 -1
package/README.md
CHANGED
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/resolvcharts)
|
|
4
4
|
[](./LICENSE)
|
|
5
5
|
|
|
6
|
-
A minimal, zero-dependency
|
|
6
|
+
A minimal, zero-dependency charting library. Small API, super fast rendering.
|
|
7
7
|
|
|
8
8
|
At [Resolvo Cloud](https://resolvocloud.com), we experienced glitchy live charts, bloated libraries and just overcomplicated processes for something as simple as charting, so we made ResolvCharts to Resolve that issue.
|
|
9
9
|
|
|
10
|
+
The result? A Lightweight library, with our benchmarks showing over 30x faster rendering than alternative charting solutions we've explored.
|
|
11
|
+
|
|
10
12
|
## Install
|
|
11
13
|
|
|
12
14
|
```sh
|
|
@@ -44,9 +46,14 @@ The `data` shape depends on `type` — pick the row you need:
|
|
|
44
46
|
| `baseline` | `{ x, series: [{ y }] }` | Delta vs a reference value |
|
|
45
47
|
| `sparkline` | `{ x, series: [{ y }] }` | Tiny inline chart, no axes |
|
|
46
48
|
| `scatter` | `{ x, series: [{ y }] }` | Point clouds |
|
|
49
|
+
| `bubble` | `{ x, series: [{ y, r }] }` | Scatter + radius channel |
|
|
50
|
+
| `rangearea` | `{ x, series: [{ y, y2 }] }` | Min–max band, confidence intervals |
|
|
47
51
|
| `bar` | `{ categories, series: [{ values }] }` | Categorical groups; `stacked` supported |
|
|
48
52
|
| `combo` | `{ categories, series: [{ values, kind }] }` | Columns + line/area overlay |
|
|
53
|
+
| `radar` | `{ categories, series: [{ values }] }` | Multi-axis polygon comparison |
|
|
54
|
+
| `funnel` | `{ categories, series: [{ values }] }` | Stage drop-off (first series) |
|
|
49
55
|
| `donut` | `{ slices: [{ label, value }] }` | Share of a total |
|
|
56
|
+
| `pie` | `{ slices: [{ label, value }] }` | Donut without the hole |
|
|
50
57
|
| `candle` / `ohlc` | `{ candles: [{ x, open, high, low, close, volume? }] }` | Financial OHLC (+ volume band) |
|
|
51
58
|
| `waterfall` | `{ categories, values, totals? }` | P&L bridges, signed deltas |
|
|
52
59
|
|
|
@@ -102,11 +109,41 @@ createChart(el, {
|
|
|
102
109
|
data: { x: [0, 1, 2], series: [{ y: [-2, 4, -1] }] },
|
|
103
110
|
});
|
|
104
111
|
|
|
105
|
-
// Donut
|
|
112
|
+
// Donut / pie — same data, "pie" fills to the center
|
|
106
113
|
createChart(el, {
|
|
107
114
|
type: "donut",
|
|
108
115
|
data: { slices: [{ label: "A", value: 40 }, { label: "B", value: 60 }] },
|
|
109
116
|
});
|
|
117
|
+
|
|
118
|
+
// Bubble — per-point `r` scales circle radius
|
|
119
|
+
createChart(el, {
|
|
120
|
+
type: "bubble",
|
|
121
|
+
data: { x: [0, 1, 2], series: [{ label: "A", y: [3, 7, 5], r: [4, 12, 8] }] },
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
// Range area — band between `y` (lower) and `y2` (upper)
|
|
125
|
+
createChart(el, {
|
|
126
|
+
type: "rangearea",
|
|
127
|
+
data: { x: [0, 1, 2], series: [{ label: "Temp", y: [10, 12, 11], y2: [18, 21, 19] }] },
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
// Radar — one axis per category
|
|
131
|
+
createChart(el, {
|
|
132
|
+
type: "radar",
|
|
133
|
+
data: {
|
|
134
|
+
categories: ["Speed", "Power", "Range", "Cost"],
|
|
135
|
+
series: [{ label: "A", values: [8, 6, 7, 9] }],
|
|
136
|
+
},
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
// Funnel — stage widths follow the first series' values
|
|
140
|
+
createChart(el, {
|
|
141
|
+
type: "funnel",
|
|
142
|
+
data: {
|
|
143
|
+
categories: ["Visit", "Signup", "Trial", "Paid"],
|
|
144
|
+
series: [{ label: "Users", values: [4200, 1800, 620, 240] }],
|
|
145
|
+
},
|
|
146
|
+
});
|
|
110
147
|
```
|
|
111
148
|
|
|
112
149
|
## Options
|
|
@@ -128,7 +165,7 @@ Universal:
|
|
|
128
165
|
| `labels` | — | `{x?: (v)=>string, y?: (v)=>string}` tick formatters |
|
|
129
166
|
| `onHover` | — | `(info \| null) => void` |
|
|
130
167
|
|
|
131
|
-
xy charts (`line` `area` `scatter` `sparkline` `baseline`):
|
|
168
|
+
xy charts (`line` `area` `scatter` `bubble` `rangearea` `sparkline` `baseline`):
|
|
132
169
|
|
|
133
170
|
| Option | Default | Description |
|
|
134
171
|
|---|---|---|
|
|
@@ -196,6 +233,19 @@ The viewport (x/y domain) animates toward the new domain on every `append()` —
|
|
|
196
233
|
- Zero-allocation streaming — steady-state `append()` reuses buffers via `copyWithin` and buffer ping-pong
|
|
197
234
|
- O(n) monotonic fast path — already-sorted data skips the index sort entirely
|
|
198
235
|
|
|
236
|
+
### Benchmarks
|
|
237
|
+
|
|
238
|
+
Same machine, browser, data, and chart size (900×240, two series). Methodology and full tables: [BENCHMARK_COMPARISON.md](./BENCHMARK_COMPARISON.md).
|
|
239
|
+
|
|
240
|
+
| | resolvcharts | Chart.js 4.5 | ApexCharts 8.3 | Highcharts 13.1 |
|
|
241
|
+
|---|---|---|---|---|
|
|
242
|
+
| Line render, 1M pts ×2 | **0.20 ms** | 136–1380 ms | 484 ms | 248–3194 ms |
|
|
243
|
+
| Streaming, 50k window | **120 fps** | 15 fps | 17 fps | 13 fps |
|
|
244
|
+
| Bundle (gzip) | **21.4 KB** | 70.7 KB | 269.8 KB | 102.3 KB |
|
|
245
|
+
|
|
246
|
+
Chart.js range = built-in decimation on/off; Highcharts range = WebGL boost module on/off. Even the Canvas2D fallback (3.5 ms at 1M) is ~39× faster than the best competitor configuration.
|
|
247
|
+
|
|
248
|
+
Last benchmarked as of Oct 18, 2026
|
|
199
249
|
---
|
|
200
250
|
|
|
201
251
|
A project by [Resolvo Cloud](https://resolvocloud.com)
|