Closed rnrsr closed 3 years ago
I was following along with the guide for adding a chart: https://github.com/rawgraphs/raw/wiki/Adding-New-Charts
Using the exact code that is specified in the guide, and here: https://github.com/densitydesign/raw/blob/master/charts/chart.js
At runtime you see an undefined error.
TypeError: Cannot read property 'linear' of undefined
It seems as though the latest version of "d3" no longer uses this linear() method:
linear()
var xScale = d3.scale.linear()... should be var xScale = d3.scaleLinear()...
var xScale = d3.scale.linear()...
var xScale = d3.scaleLinear()...
Unless ofc there is a need to lock the version of d3 package?
hi you're right, we must update the docs. RAWGraphs is now using d3.js 5.4.0
new documentation for the last version is on the way
I was following along with the guide for adding a chart: https://github.com/rawgraphs/raw/wiki/Adding-New-Charts
Using the exact code that is specified in the guide, and here: https://github.com/densitydesign/raw/blob/master/charts/chart.js
At runtime you see an undefined error.
It seems as though the latest version of "d3" no longer uses this
linear()
method:var xScale = d3.scale.linear()...
should bevar xScale = d3.scaleLinear()...
Unless ofc there is a need to lock the version of d3 package?