-
Notifications
You must be signed in to change notification settings - Fork 104
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
d3 legend does not work with d3 v3 #58
Comments
As it says on the documentation, if you're using v3 of d3 you should be using v1 of d3-legend, here it is on cdn: https://cdnjs.com/libraries/d3-legend/1.13.0 Let me know if you have any problems. |
Ah I understand your confusion, the cdn links aren't going to v1 I'll update that now. |
@susielu However, including the file you pointed out gives me this error
|
Hmm I just put together a working example, does this help at all? |
It seems like something is going wrong with the selection you're passing to the function. |
@susielu |
I am using this version of d3 https://d3js.org/d3.v3.min.js. Which version from
cdnjs
is the one that is usable with the suggestedd3
version? When I use that one https://cdnjs.com/libraries/d3-legend and I tryd3.legend.color()
it says that this is not defined. Looking into the code, itsd3.legendColor()
. When I go onto this site http://d3-legend-v3.susielu.com/ and then click "Include file directly - All legends" I get directed to this URL https://raw.githubusercontent.com/susielu/d3-legend/master/d3-legend.min.js which again hasd3.legendColor()
in it...Its rather frustrating...
The text was updated successfully, but these errors were encountered: