4.0.0 (2026-06-16)
The detailed new feature description can be found at:
billboard.js 4.0 release: Canvas rendering mode, 94.3% faster overall in benchmark! (dev.to link)
Bug Fixes
- background: Correct background image position in canvas (34009de)
- boost: Correct rootSelector typo in CSS scope initialization (a0673ee), closes #4123
- boost: Reuse Worker and Object URL to prevent memory leak (fc812fb), closes #3720
- canvas: address canvas render review issues (70df3f6)
- canvas: align candlestick labels with wick endpoints (b328da4)
- canvas: align rendering and touch interaction parity (5944cab)
- data: Add type check before 'in' operator in JSON dot-notation path resolver (67c00b9), closes #4116
- data: Handle non-array value for data.json (dc5d04c), closes #4103
- types: Add file extensions to types (02c7bf6), closes #4097
- types: Export shape option types from main entry point (#4109) (f4a236a), closes #4104
- util: camelCase SVG tag/attribute matching in sanitizer (631ddc5), closes #4078 #4106
- util: update sanitization function (#4105) (d492644)
- zoom: fix drag zoom boundary release and circle transition desync (00f6859), closes #4131 #4131
Features
- canvas: add canvas rendering mode (200c99e)
- esm: tree-shakable grid, regions, category modules (678e761)
- funnel: Rotate and spline option (7a7bf25), closes #4024
- plugin-tableview: add numberFormat configuration option (2abe355), closes #4140 #4141 by @Loksly
BREAKING CHANGES
- esm: chart.export() and chart.flow() are no longer
included automatically in the ESM build. Explicit import required:
import bb, { bar, exportApi, flow } from "billboard.js";
bb.generate({ ...bar(), ...exportApi(), ...flow(), data: { ... } });UMD bundle users are not affected.
- refactor(esm): remove prototype stubs for export and flow modules
Remove the stub implementations and delete calls that were added as
fallbacks — they are unnecessary now that the resolver pattern handles
lazy loading directly without stub cleanup.
- feat(esm): make grid, regions, category APIs tree-shakable
- Introduce grid(), regions(), category() resolver modules for opt-in ESM import
- Remove apiGrid, apiRegion, apiCategory from axis resolver
- Remove internal grid/region renderers from axis resolver
- Extend Chart/api/stubs with xgrids/ygrids/regions/category/categories stubs
- Add optional chaining in redraw/eventrect/flow/ChartInternal for grid/region methods
- Update UMD entry to auto-invoke new resolvers
- Update ESM entry to export new resolvers
- Point runtime error docs to new MODULE_IMPORTS.md guide
- Add tests for new optional modules
Add CHANGELOG-v4.md for release notes and MODULE_IMPORTS.md as the
canonical module import guide referenced from runtime error messages.
- esm: In ESM builds, chart.xgrids()/ygrids(), chart.regions(),
chart.category()/categories() now require explicit import:
import bb, {bar, grid, regions, category} from "billboard.js";
grid(); regions(); category(); // run once per appUMD bundle users are not affected — the UMD entry auto-invokes all resolvers.