Skip to main content

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.

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.
Taucharts v2 is not backward compatible with v1. All five categories of breaking changes listed below must be addressed before your charts will render correctly.

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.
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.17/d3.min.js"></script>
<script src="tauCharts.min.js"></script>
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 from tauCharts to Taucharts.
var chart = new tauCharts.Chart({ ... });

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.
.graphical-report__svg { ... }
.graphical-report__legend { ... }

4. Plugin alias for export-to

The export plugin alias changed from exportTo to export-to.
plugins: [
  tauCharts.api.plugins.get('exportTo')()
]

5. Distributive file paths

The file layout inside the dist/ folder was reorganised in v2:
Assetv1 pathv2 path
Core JS (minified)dist/tauCharts.min.jsdist/taucharts.min.js
Core CSS (minified)dist/tauCharts.min.cssdist/taucharts.min.css
Core + plugins (minified)dist/taucharts.min.js + dist/taucharts.min.css
Individual plugin JSdist/plugins/<name>.jsdist/plugins/<name>.js
The minified bundle at 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/:
import tooltip from 'taucharts/dist/plugins/tooltip';
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

1

Update D3 to v4 or v5

Remove D3 v3 from your project and install D3 v4 or v5.
npm uninstall d3
npm install d3@5
If you use a CDN, replace the D3 script tag with the latest D3 v4/v5 URL.
2

Update the Taucharts package

npm install taucharts@2
If you use Bower:
bower install taucharts
3

Update the global object reference

Do a project-wide find-and-replace of tauChartsTaucharts in all JavaScript and TypeScript files.
// Before
var chart = new tauCharts.Chart({ ... });
tauCharts.api.plugins.get('legend')();

// After
var chart = new Taucharts.Chart({ ... });
Taucharts.api.plugins.get('legend')();
4

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.
/* Before */
.graphical-report__svg { overflow: visible; }

/* After */
.tau-chart__svg { overflow: visible; }
5

Update the export-to plugin alias

// Before
Taucharts.api.plugins.get('exportTo')()

// After
Taucharts.api.plugins.get('export-to')()
6

Update file import paths for plugins

If you import plugins individually as ES modules, verify the import paths resolve correctly under the new dist/plugins/ layout.
// Both v1 and v2 use the same plugin path:
import tooltip  from 'taucharts/dist/plugins/tooltip';
import legend   from 'taucharts/dist/plugins/legend';
import exportTo from 'taucharts/dist/plugins/export-to';
//                                              ^ was 'exportTo' in some builds
Update any CSS imports that referenced the old minified filename:
// Before
import 'taucharts/dist/tauCharts.min.css';

// After
import 'taucharts/dist/taucharts.min.css';

v2.x improvements summary

The following improvements were shipped across the v2.x release series (see CHANGELOG.md for the full history):
  • D3 v4 is now a required peer dependency.
  • New global object name Taucharts, CSS prefix .tau-chart__, and export-to plugin alias.
  • Reorganised dist/ layout with a combined minified bundle.
  • 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 lineBreak and lineBreakSeparator guide flags.
  • Clickable entries added to the tooltip plugin settings (clickable option).
  • Quick-filter plugin gains field bound settings.
  • Legend plugin gains onSelect handler and selectedCategories settings.
  • Color Brewer addon returned to the npm package.
  • Area annotation stretches to first or last ticks when min/max values are omitted.
  • 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.
  • IE11 support restored.
  • Tooltip plugin gains onExclude event.
  • Performance fix for measure dates on very old (pre-1970) date values.
  • Axis label blinking and shaking during re-renders fixed.
  • tickFormat guide now accepts a function in addition to a format string.

Build docs developers (and LLMs) love