I have a line graph using a fleet. I want the tooltip to show the x-axis and y-axis values.
I'm trying to:
content: "Orders <b>%y</b> for <span>%x</span>",
But it shows "Orders 100 for 0" for the first point, "Orders 100 for 1" for the second, etc.
If I use:
content: "Orders <b>%y</b> for <span>"+chartData.axis[0][1]+"</span>",
This then correctly shows the x-axis value for the first point.
But this does not work:
content: "Orders <b>%y</b> for <span>"+chartData.axis[%x][1]+"</span>",
This gives me:
Uncaught SyntaxError: Unexpected token %
How can I refer to the% x value inside chartData.axis?
Chris source
share