I am trying to display certain values in my chart, although rather than the actual value being displayed, the function is. How can I display the actual return value of the function? The temperature displays well.
Furthermore, the \n
doesn't work either. Is there any way that could be done?
d3.select(this)
.select('text')
.text("Date: " + function(d){ return d.date;} +
"\nTemperature: " + y.invert(pos.y).toFixed(2) +
"\nEvent: " + function(d){ return d.event;});