Home Forums Chart Support Showing Time in Mouseover data points

Showing Time in Mouseover data points

Viewing 2 posts - 1 through 2 (of 2 total)
  • #39240

    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.

    Screenshot

    #39247

    @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.


    Vishwas R
    Team CanvasJS

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.