Cannot read properties of undefined (reading 'schemeCategory10')
aldrienht opened this issue · comments
- C3 version: v0.7.0
- D3 version: not using
- Browser: Chrome
- OS: OSX
ERROR: Uncaught TypeError: Cannot read properties of undefined (reading 'schemeCategory10')
SAMPLE CODE where error show up:
c3.generate({
bindto: '#chart',
data: {
x: 'x',
columns: [
data['dates'],
data['impressions'],
data['clicks'],
data['ctr'],
data['positions']
]
},
axis: {
x: {
type: 'timeseries',
tick: {
format: '%Y-%m-%d'
}
}
},
tooltip: {
format: {
value: function (value, ratio, id) {
.....
}
}
}
});
Solved - got it working by including d3.min.js
For c3.js version 0.7.0 - compatible d3 version is 5.16.0
https://cdnjs.cloudflare.com/ajax/libs/d3/5.16.0/d3.min.js