@wick-charts/react 0.2.1 → 0.2.3

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
@@ -1,8 +1,8 @@
1
- <!-- Generated from README.tmpl.md — edit the template, not this file. -->
2
-
3
1
  # Wick Charts
4
2
 
5
- High-performance timeseries charts for **React**, **Vue**, and **Svelte**. Canvas-rendered, tree-shakeable, ~25KB gzipped.
3
+ <!-- Generated from README.tmpl.md edit the template, not this file. -->
4
+
5
+ High-performance timeseries charts for **React**, **Vue**, and **Svelte**. Canvas-rendered, tree-shakeable, ~36KB gzipped when tree-shaken.
6
6
 
7
7
  [Live Demo](https://mo4islona.github.io/wick-charts/)
8
8
 
@@ -70,8 +70,6 @@ Every DOM overlay ships a default UI **and** a scoped slot / render-prop so you
70
70
  | `PieTooltip` | Tooltip for pie/donut hover | `{ info, format }` |
71
71
  | `PieLegend` | Slice labels with values or percentages | `{ slices, mode, format }` |
72
72
 
73
- > `TooltipLegend` is the former name of `InfoBar` and is still exported as a deprecated alias.
74
-
75
73
  ## Custom render (slots / render-props)
76
74
 
77
75
  ```tsx
@@ -102,7 +100,7 @@ Each overlay has its own slot context (see the Slot ctx column above); the shape
102
100
  Every numeric overlay accepts a `format` prop so you can override the default label rendering. Two shared helpers ship in each framework package (`@wick-charts/react`, `@wick-charts/vue`, `@wick-charts/svelte`):
103
101
 
104
102
  - `formatCompact(v)` — K/M/B/T suffixes with adaptive precision. Default for `YAxis` (at ranges ≥ 1e6), `PieLegend`, `PieTooltip`, `Sparkline`.
105
- - `formatPriceAdaptive(v)` — full-precision display that scales decimals to the value's magnitude. Default for `Tooltip` / `TooltipLegend` OHLC and line-value cells. Handles sub-cent prices (`0.00001234` → `"0.00001234"`, not `"0.00"`).
103
+ - `formatPriceAdaptive(v)` — full-precision display that scales decimals to the value's magnitude. Default for `Tooltip` / `InfoBar` OHLC and line-value cells. Handles sub-cent prices (`0.00001234` → `"0.00001234"`, not `"0.00"`).
106
104
 
107
105
  ```tsx
108
106
  import { Tooltip, YAxis, formatCompact } from '@wick-charts/react';
@@ -111,7 +109,7 @@ import { Tooltip, YAxis, formatCompact } from '@wick-charts/react';
111
109
  <Tooltip format={(v, field) => field === 'volume' ? formatCompact(v) : v.toFixed(4)} />
112
110
  ```
113
111
 
114
- Tooltip / TooltipLegend pass a `field` arg (`'open' | 'high' | 'low' | 'close' | 'volume' | 'value'`) so you can branch on which cell you're formatting. All other overlays receive a single `value: number`.
112
+ Tooltip / InfoBar pass a `field` arg (`'open' | 'high' | 'low' | 'close' | 'volume' | 'value'`) so you can branch on which cell you're formatting. All other overlays receive a single `value: number`.
115
113
 
116
114
  ## Themes
117
115
 
@@ -198,15 +196,15 @@ Full `dist/index.js` (minified + gzipped):
198
196
 
199
197
  | Package | Raw | Gzip |
200
198
  |---|---|---|
201
- | `@wick-charts/react` | 181 KB | 45.6 KB |
199
+ | `@wick-charts/react` | 224 KB | 59.3 KB |
202
200
 
203
201
  Tree-shaking on the consumer side cuts this down further — `pnpm size` builds representative React scenarios through esbuild with production settings:
204
202
 
205
203
  | Scenario | Raw | Gzip |
206
204
  |---|---|---|
207
- | Candlestick only | 98 KB | 28.5 KB |
208
- | Line only | 98 KB | 28.6 KB |
209
- | Full React (all overlays) | 115 KB | 32.8 KB |
205
+ | Candlestick only | 122.1 KB | 36.3 KB |
206
+ | Line only | 122.4 KB | 36.4 KB |
207
+ | Full React (all overlays) | 140.6 KB | 41.3 KB |
210
208
 
211
209
  ## Migration
212
210
 
@@ -214,4 +212,4 @@ Upgrading across versions? See [MIGRATION.md](https://github.com/mo4islona/wick-
214
212
 
215
213
  ## License
216
214
 
217
- MIT
215
+ MIT