Home Forums Chart Support How to get the tick at 12:00 instead of 00:00

How to get the tick at 12:00 instead of 00:00

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

    If you have a look at this jsfiddle : https://jsfiddle.net/flanguy/r2u4pq1h/2/ you can see that I set the measures at 12:00.
    The reason is simpel : if I let it at 00:00 and the user set the cursor very close on the right, he might think that the measure took place the day before.

    For an even better understanding I would like to set the thick at 12:00, but I didn’t find any way for this.

    Can you help me ?

    Regards,

    Fabian

    #61833

    @flanguy,

    Labels are positioned equidistantly, and controlling the starting point of axis labels is not possible as of now. However, you can use striplines to place ticks at required positions on the axis by setting the stripline thickness to 0 and tickThickness to 1 as shown in the code snippet below:

    {
    	value: new Date(2026, 0, 6, 12, 0, 0),
    	labelPlacement: "outside",
    	label: "12PM",
    	labelFontColor: "grey",
    	labelBackgroundColor: "transparent",
    	thickness: 0,
    	tickThickness: 1,
    	tickColor: "grey"
    }

    Please check this JSFiddle for a working example.


    Thangaraj Raman
    Team CanvasJS

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

You must be logged in to reply to this topic.