rawgraphs / rawgraphs-app

A web interface to create custom vector-based visualizations on top of RAWGraphs core
https://rawgraphs.io
Apache License 2.0
8.66k stars 1.84k forks source link

Developer guide uses outdated d3 methods #199

Closed rnrsr closed 3 years ago

rnrsr commented 4 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:

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 commented 4 years ago

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

uf0 commented 3 years ago

new documentation for the last version is on the way