I would like to make the x-axis marking clickable so that the text contains links.
Here is the fiddle of my code: http://jsfiddle.net/3gLfb401/
The x-axis marking consists of the date and assembly number. The build number must be a reference. In this example, this should be sufficient if it links to google.com or something like that.
I already searched the Internet and found some things that could do this, but I donβt know how to place them.
I thought this might work:
x.html(d3.time.format("%Y-%m-%d")(d.date) + '<a href= "http://google.com" target="_blank">' + "#" + d.buildNb + "</a>")
This is the method that currently forms the labeling text:
function formatDataToTick(d) { return d3.time.format("%Y-%m-%d")(d.date) + " #" + d.buildNb; }
source share