Inferring chart type from autocorrelation and other evils | Toph Tucker | Observable
•ojs
•ojs
•ojs
•ojs
•ojs
•ojs
•ojs
•ojs
Comments (4)
Cobus Theunissen
Sep 9, 2020
I think the click event doesn't work anymore, because the payload changed for events... so this probably should be changed? .on("click", (_, i) => choose(i))
Toph Tucker
Sep 18, 2020
Oh yeah, thanks Cobus!
Mario Delgado
Jan 25, 2021
SVG element's don't have title attributes;
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
See
http://bl.ocks.org/ilyabo/1339996
for an example of adding the title element. For your code, use: sel .selectAll("svg") ... .on("click", (_, d) => choose(d)) .append("svg:title").text( d =>
d.name
);
Toph Tucker
Jan 25, 2021
Great point Mario — fixed.
Reply
Add comment
Subscribe to notifications
Observable
Sign in
Toph Tucker
211
Reply
Add comment
Subscribe to notifications
60
Inferring chart type from autocorrelation and other evils | Toph Tucker | Observable