Benchmarks
Compare Bklit UI against Recharts and TanStack Charts on your own device. Every run uses the same seeded data, size, and chart type. Enter animations are shown for reference but never counted in the scores.This is a basic, informal comparison, not an official benchmark. Results depend on your device and browser, and on how each chart is configured here, so they may not be fully accurate or show any library at its best. Recharts and TanStack Charts are both excellent libraries; see their docs for recommended setups.
Benchmark setup
Same seeded data, same pixel size, one chart at a time. Timed to the frame that shows the chart; enter animations are never scored.
Chart
LineAreaBarScatter
Points per series
1001,0005,00010,000
Series
123
Iterations
51020
Animation
OffOn
Libraries
Live run area
720×320px
Ready to benchmark
Charts mount here one library at a time. Keep this area on screen while the run is in progress.
No results yet
Scores appear here once a run finishes, one card per metric.
Press Run benchmark above. Results come from your device, so run it a few times and compare.
What's being compared
The same chart type and data in each library, so you can check they're comparable.
bklitvworkspace
React + SVG, animated with Motion.
Rechartsv3.10.1
React + SVG, built-in enter animation.
TanStack Chartsv1.1.0
Framework-neutral scene, React SVG host; motion() renderer when animated.
Methodology
What each number means, when timing stops, and how each library was set up.
Every timing ends at the painted frame that shows the result. Mount is wall-clock; update and hover count main-thread work only.
Timings are your device, your browser, right now.
Fairness notes
How each library's chart was configured, and what couldn't be matched exactly.
- bklit
- SVG + Motion. Line, area, bar and scatter all default to a 1100 ms enter reveal; on data updates line paths and bars morph and the y-domain tweens (500 ms). Charts size themselves from their parent (ResizeObserver), so the first chart frame lands a frame or two after mount; that wait is counted. Line and area downsample each series (LTTB) to 1.5 points per plot pixel, so at 1,000+ points their paths hold fewer points than the other libraries'. Hover renders are deferred to rAF; the frame that paints them is counted.
- Recharts
- SVG. Default enter animation: 1,500 ms for Line/Area, 400 ms for Bar/Scatter. Fixed width/height (no ResponsiveContainer). Line dots disabled to match bklit; hover dot (activeDot) and Tooltip cursor are defaults. Time x reads a precomputed epoch-ms key. Hover is rAF-throttled by default (throttleDelay 'raf'). Scatter uses per-point (item) tooltips, so hover sweeps across rendered points.
- TanStack Charts
- SVG. Animation off uses the default Chart (no entrance animation); animation on uses the opt-in motion() renderer (1,100 ms tween), with tooltip and crosshair motion off so hover snaps. focus: "group-x" scans every point per move (a spatialIndex is not consulted for group-x). The motion() renderer pre-renders one hidden focus ring <circle> per point, raising DOM nodes when animated. Time x uses d3-scale scaleTime; curves via d3Curve(curveMonotoneX).
- Every library draws the same chrome: horizontal grid, x axis, a hover tooltip with a cursor or crosshair, no legend, and a monotone curve for line and area. Each uses its own idiomatic, documented API at a fixed pixel size.
- Timings stop at the frame that actually shows the chart, checked the same way for every library (an svg, tick labels and the expected marks), not at the first frame after React's render call. bklit sizes itself from its parent with a ResizeObserver and draws a frame or two after mount; those frames count against it.
- Animation can be switched off for a static comparison (each library's own off switch; TanStack's default Chart). With animation on, TanStack uses its opt-in motion() renderer, since its default component has no entrance animation, and its tooltip and crosshair tweens are turned off so hover snaps like the others.
- With animation on, TanStack's motion() renderer pre-renders a hidden focus ring per point, so its DOM node count is higher than its static renderer's.
- bklit line and area charts downsample each series to 1.5 points per plot pixel (Largest-Triangle-Three-Buckets). From roughly 1,000 points up their paths hold fewer points than Recharts' or TanStack's, which draw every point. That is a bklit feature, and part of why it scales; bar and scatter draw every point in every library.
- TanStack hover uses focus: "group-x", its documented setup for a shared x tooltip, which scans every point per move; a spatialIndex is not consulted for group-x. Recharts' active-index lookup is also linear; bklit bisects.
- TanStack grouped bars need one row per category and series, so its adapter reshapes the data. That cost is included in its mount and update times.
- TanStack areas are an areaY plus a decorative lineY edge per series, as its docs recommend, so each series gets a single tooltip row.
- Recharts draws a dot on every line point by default. These are turned off (dot={false}) to match bklit, while the hover dot (activeDot) stays on. Recharts scatter points render as <path> elements, and its time axis reads a precomputed epoch-ms key, the string dataKey its performance guide recommends.
- Recharts' default enter animation is 1,500 ms for line and area but 400 ms for bar and scatter. With animation on, Recharts skips bars until they start to grow, so animated bar charts count as drawn once the plot and axis are up. Recharts also skips animation when the OS prefers reduced motion, so run with that setting off.
- Hover sends what a real mouse would (over/out when the element under the pointer changes, then pointermove and mousemove) to the element actually under each point. Line, area and bar sweep across the plot; scatter moves across rendered points, because Recharts' scatter tooltip only reacts over a point. Each move starts right after a paint. A library that defers its hover render to a task or rAF is followed to the frame that paints it, and that work counts. Tooltip spring or tween motion after that frame is not counted.