Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Developer guide uses outdated d3 methods #199

Open
rnrsr opened this issue Nov 5, 2019 · 1 comment
Open

Developer guide uses outdated d3 methods #199

rnrsr opened this issue Nov 5, 2019 · 1 comment
Labels

Comments

@rnrsr
Copy link

@rnrsr rnrsr commented Nov 5, 2019

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:

var xScale = d3.scale.linear()...
should be
var xScale = d3.scaleLinear()...

Unless ofc there is a need to lock the version of d3 package?

@mikima
Copy link
Contributor

@mikima mikima commented Nov 5, 2019

hi you're right, we must update the docs. RAWGraphs is now using d3.js 5.4.0

@mikima mikima added the docs label Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.