Taucharts v2 was released on January 31, 2018 as a major version bump that aligned the library with D3 v4, introduced a new CSS namespace, and reorganised the distributive file layout. If you are upgrading an existing v1 project, you will need to update your D3 dependency, rename a handful of identifiers, and adjust your import paths. This guide covers every breaking change and walks you through the migration in order.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/TargetProcess/tauCharts/llms.txt
Use this file to discover all available pages before exploring further.
Breaking changes
1. D3 version
D3 v4 is now a required peer dependency. Taucharts v1 used D3 v3, which has a different module structure and is not interchangeable.taucharts@2 is compatible with both D3 v4 and D3 v5. Use
taucharts@1 only if you must keep D3 v3.2. Global object name
The global JavaScript object was renamed fromtauCharts to Taucharts.
3. CSS class prefix
All CSS classes generated by Taucharts changed their prefix from.graphical-report__ to .tau-chart__. Any custom styles or JavaScript selectors that target Taucharts-generated elements by class name must be updated.
4. Plugin alias for export-to
The export plugin alias changed fromexportTo to export-to.
5. Distributive file paths
The file layout inside thedist/ folder was reorganised in v2:
| Asset | v1 path | v2 path |
|---|---|---|
| Core JS (minified) | dist/tauCharts.min.js | dist/taucharts.min.js |
| Core CSS (minified) | dist/tauCharts.min.css | dist/taucharts.min.css |
| Core + plugins (minified) | — | dist/taucharts.min.js + dist/taucharts.min.css |
| Individual plugin JS | dist/plugins/<name>.js | dist/plugins/<name>.js |
dist/taucharts.min.js now bundles the core and all plugins together. To import a single plugin as an ES module, use the path under dist/plugins/:
The individual plugin path under
dist/plugins/ is the same in both versions. The main change is that dist/taucharts.min.js in v2 already includes all plugins, so CDN users no longer need to load plugin files separately.Migration steps
Update D3 to v4 or v5
Remove D3 v3 from your project and install D3 v4 or v5.If you use a CDN, replace the D3 script tag with the latest D3 v4/v5 URL.
Update the global object reference
Do a project-wide find-and-replace of
tauCharts → Taucharts in all JavaScript and TypeScript files.Update CSS class selectors
Replace all occurrences of
.graphical-report__ with .tau-chart__ in your stylesheets and any JavaScript that queries the DOM by class name.v2.x improvements summary
The following improvements were shipped across the v2.x release series (seeCHANGELOG.md for the full history):
v2.0.0 — Initial v2 release (January 2018)
v2.0.0 — Initial v2 release (January 2018)
- D3 v4 is now a required peer dependency.
- New global object name
Taucharts, CSS prefix.tau-chart__, andexport-toplugin alias. - Reorganised
dist/layout with a combined minified bundle.
v2.1.0 – v2.2.x — Layout and label improvements
v2.1.0 – v2.2.x — Layout and label improvements
- Y facet labels repositioned to top-left under the facet cell.
- Y axis label moved to the top; X axis label moved to the right.
- Multiline label support added via
lineBreakandlineBreakSeparatorguide flags. - Clickable entries added to the tooltip plugin settings (
clickableoption).
v2.3.x – v2.5.x — Filtering and annotation improvements
v2.3.x – v2.5.x — Filtering and annotation improvements
- Quick-filter plugin gains field bound settings.
- Legend plugin gains
onSelecthandler andselectedCategoriessettings. - Color Brewer addon returned to the npm package.
- Area annotation stretches to first or last ticks when min/max values are omitted.
v2.6.0 — D3 v5 support (September 2018)
v2.6.0 — D3 v5 support (September 2018)
- D3 v5 is now supported alongside D3 v4.
- AMD build fixed for plugin files.
- X dimension rotation guide params now work with auto-layout spec.
v2.7.x – v2.8.x — Performance and format improvements
v2.7.x – v2.8.x — Performance and format improvements
- IE11 support restored.
- Tooltip plugin gains
onExcludeevent. - Performance fix for measure dates on very old (pre-1970) date values.
- Axis label blinking and shaking during re-renders fixed.
tickFormatguide now accepts a function in addition to a format string.