
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
@wick-charts/react
Advanced tools
High-performance canvas timeseries charts for React — candlestick, line, bar, pie. Tree-shakeable, zero runtime deps.
High-performance timeseries charts for React, Vue, and Svelte. Canvas-rendered, tree-shakeable, ~36KB gzipped when tree-shaken.
buildHoverSnapshots / buildLastSnapshots / computeTooltipPosition for overlays that need to escape the built-in UI (structural-equality cache included)npm install @wick-charts/react
import {
ChartContainer, CandlestickSeries, Tooltip,
Crosshair, YAxis, TimeAxis
} from '@wick-charts/react';
function Chart({ data }) {
return (
<ChartContainer>
<CandlestickSeries data={data} />
<Tooltip />
<Crosshair />
<YAxis />
<TimeAxis />
</ChartContainer>
);
}
| Component | Data Format | Description |
|---|---|---|
CandlestickSeries | { time, open, high, low, close, volume? }[] | OHLC candlesticks with volume bars |
LineSeries | { time, value }[][] | Line/area charts, multi-layer, stacking |
BarSeries | { time, value }[][] | Histogram/bar charts, stacking |
PieSeries | { label, value, color? }[] | Pie and donut charts |
Every DOM overlay ships a default UI and a scoped slot / render-prop so you can replace the contents with your own layout. Positioning, crosshair wiring, and data computation stay in the library — the slot just hands you the already-computed data.
| Component | Description | Slot ctx |
|---|---|---|
Tooltip | Floating glass tooltip near cursor on hover | { snapshots, time } |
InfoBar | Compact OHLC / values info bar hoisted above the canvas | { snapshots, time, isHover } |
Title | Chart title / subtitle bar hoisted above the canvas | — |
Crosshair | Axis labels at cursor position | — |
YAxis | Vertical price/value axis with animated ticks | — |
TimeAxis | Horizontal time axis with animated ticks | — |
YLabel | Floating price badge with dashed line | { value, y, bgColor, isLive, direction, format } |
Legend | Clickable legend with toggle/isolate modes | { items: LegendItem[] } |
PieTooltip | Tooltip for pie/donut hover | { info, format } |
PieLegend | Slice labels with values or percentages | { slices, mode, format } |
// React — filter two of five series with your own layout
<Tooltip>
{({ snapshots, time }) =>
snapshots
.filter((s) => s.seriesId === 'btc' || s.seriesId === 'eth')
.map((s) => (
<div key={s.id} style={{ color: s.color }}>
{s.label}: {s.data.close ?? s.data.value}
</div>
))
}
</Tooltip>
Each overlay has its own slot context (see the Slot ctx column above); the shape is consistent across frameworks for the same overlay.
buildHoverSnapshots(chart, { time, sort?, cacheKey }) / buildLastSnapshots(chart, { sort?, cacheKey }) — structural-equality-cached snapshot arrays for building your own floating widgets. Calls with the same args return the same reference while the chart's overlay version is unchanged, so React.memo / Vue computed / Svelte $: skip renders on no-op mousemoves.computeTooltipPosition({ x, y, chartWidth, chartHeight, tooltipWidth, tooltipHeight, offsetX?, offsetY? }) — flip + clamp positioning for a tooltip container you own.SeriesSnapshot, LegendItem, SliceInfo, HoverInfo.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):
formatCompact(v) — K/M/B/T suffixes with adaptive precision. Default for YAxis (at ranges ≥ 1e6), PieLegend, PieTooltip, Sparkline.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").import { Tooltip, YAxis, formatCompact } from '@wick-charts/react';
<YAxis format={(v) => `$${formatCompact(v)}`} />
<Tooltip format={(v, field) => field === 'volume' ? formatCompact(v) : v.toFixed(4)} />
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.
22 built-in themes. Import only the ones you need (tree-shakable) and pass them to ChartContainer or ThemeProvider for global theming.
import { catppuccin } from '@wick-charts/react';
// Dark: andromeda, ayuMirage, catppuccin, dracula, gruvbox, highContrast,
// materialPalenight, monokaiPro, nightOwl, oneDarkPro, panda
// Light: githubLight, handwritten, lavenderMist, lightPink, minimalLight, mintBreeze,
// peachCream, quietLight, rosePineDawn, sandDune, solarizedLight
<ChartContainer theme={catppuccin.theme}>
Create custom themes with createTheme():
import { createTheme } from '@wick-charts/react';
const myTheme = createTheme({
background: '#1a1b2e',
candlestick: {
up: { body: '#00d4aa' },
down: { body: '#ff5577' },
},
axis: { textColor: '#8888aa' },
});
// Full replace (initial load)
<CandlestickSeries data={allCandles} />
// The component auto-detects changes:
// - data.length grew by 1-5 → append
// - data.length same → update last point
// - data.length shrunk or grew by >5 → full replace
const chart = useChartInstance();
chart.batch(() => {
chart.setSeriesData(id, layer0, 0);
chart.setSeriesData(id, layer1, 1);
// Y-range and render happen once after batch
});
<ChartContainer
theme={theme}
axis={{
y: { visible: true, width: 55, min: 0, max: 'auto' },
x: { visible: true, height: 30 },
}}
padding={{ top: 20, bottom: 20, right: { intervals: 3 }, left: { intervals: 0 } }}
gradient={true}
interactive={true}
grid={true}
>
| Hook | Description |
|---|---|
useChartInstance() | Access the ChartInstance from context |
useVisibleRange(chart) | Current visible time range |
useYRange(chart) | Current Y-axis min/max |
useLastYValue(chart, id) | Last value + live status for a series |
usePreviousClose(chart, id) | Previous close price |
useCrosshairPosition(chart) | Crosshair coordinates and snapped time |
Full dist/index.js (minified + gzipped):
| Package | Raw | Gzip |
|---|---|---|
@wick-charts/react | 224 KB | 59.3 KB |
Tree-shaking on the consumer side cuts this down further — pnpm size builds representative React scenarios through esbuild with production settings:
| Scenario | Raw | Gzip |
|---|---|---|
| Candlestick only | 122.1 KB | 36.3 KB |
| Line only | 122.4 KB | 36.4 KB |
| Full React (all overlays) | 140.6 KB | 41.3 KB |
Upgrading across versions? See MIGRATION.md for per-version breaking-change notes and code snippets.
MIT
FAQs
High-performance canvas timeseries charts for React — candlestick, line, bar, pie. Tree-shakeable, zero runtime deps.
The npm package @wick-charts/react receives a total of 9 weekly downloads. As such, @wick-charts/react popularity was classified as not popular.
We found that @wick-charts/react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.