You must be logged in to post your query.
Home › Forums › Chart Support › Showing Time in Mouseover data points
Here’s a sample of my datapoints:
dataPoints: [ { x: new Date(2022, 9, 30, 10, 53), y: 1195.20 }, { x: new Date(2022, 9, 30, 11, 07), y: 1189.67 }, { x: new Date(2022, 9, 30, 11, 23), y: 1192.91 }, { x: new Date(2022, 9, 30, 11, 38), y: 1181.58 }, { x: new Date(2022, 9, 30, 11, 53), y: 1165.22 }, { x: new Date(2022, 9, 30, 12, 10), y: 1172.11 },
they represent readings taken at 10:54, 11:07, 11:23, etc.
When I mouseover a data point, I’d like it to show the TIME instead of the date from the X Axis.
@slarmon,
You can use xValueFormatString to format the x-value shown in tooltip & indexlabels. In your case, setting xValueFormatString: "HH:mm" should show just time in tooltip. Please refer to this documentation page for more information & live-example.
xValueFormatString: "HH:mm"
— Vishwas R Team CanvasJS
You must be logged in to reply to this topic. Login/Register