Skip to content

migrate from v1 to v2

XING Yun edited this page Mar 28, 2018 · 1 revision

API changes

v2 internally deprecates ES6 class inheritance and adopts object composition.
Do a global search and replace will seamlessly upgrade to v2. all chart names are in camelCase, no new operator is needed anymore.

// v1
import { Chord } from 'vizart-path';
const chart = new Chord(domId, options);

// v2
import { chord } from 'vizart-path';
const chart = chord(domId, options);

chart names:

v1 v2
Chord chord
BiPartite biPartite
ParallelCoordinates parallelCoordinates
StrentchedChord strentchedChord
Sankey sankey

API Changes

//v1
transitionColor
//v2
color
Clone this wiki locally