Colors Themes
tld3.js offers several color themes to choose from. To use a theme, you can chain the with
method and pass in an object with property name theme and property value set to the string value of one of the color themes below.
Click on the links to see the colors.
Themes
Example
/*
We chain the 'with' method after 'using'
and pass in an object with property name 'theme'
and property value set to the string value of
the theme name
ex: .with({ theme: 'bubbly' })
*/
tld3.upload('./data/barData.csv')
.then((data) => {
tld3.make('BarChartLeft')
.using(data)
.with({ theme: 'bubbly' })
.in('#barchart');
})
.catch((err) => {
console.error(err);
});