Modifying svg:path using d3

freyvd48

New Member
I've been working on this problem for a while, and i'm stumped :( I have one svg which contains some buttons i've made. Then in another svg I have a chart with various lines or svg:path's. When I click a button, I want a specific line to change color. I have the following code: \[code\]buttons.selectAll("#infoBox") .data(mydata) .enter() .append("svg:image")... some attributes here ... .on("click", function() { linechart.selectAll("svg.path") //right now i'm just selecting all the paths //because i want to check to see if it works .style("stroke", "red"); }\[/code\]Any ideas why this doesn't work? You can view my code here if you need more info about how i'm structuring everything (i'm a beginner at javascript, html and css so sorry if my code isn't very clear or concise) Thanks for any and all help :)
 
Back
Top