Black Lives Matter. Please consider donating to Black Girls Code today.

Tick should strictly start from 0,0 position when type of axis is 'date' type

Hello every one ,

i have a situation when i want tick to start from postion 0,0 always .I have tried range attribute ,but its not helping
.

This is the current status of the ticks.I want first tick on x -axis to start from 0,0 position.
Here is my layout object for reference
var layout={
title:’% Uptime’,
height: 160,
zeroline : true,

		margin: {
		    l: 30,//32,
		    r: 30,
		    b: 20,
		    t: 40,
		    pad: 0
		  },
		
		yaxis : {
			mirror: 'ticks',
			type : "string",
			range : [0,119],
			ticksuffix : "%",
			dtick : 20,
			showgrid : true,
			gridwidth : 1,
			showline : true
			
		},
		xaxis : {
			mirror: 'ticks',
			type:"date",
			tickformat : "%d-%b",
			showline : true,
			range : [xPlot[xPlot.length-1], xPlot[0]],
			tick0 : xPlot[xPlot.length-1],
			dtick : dtickMap.currentTimePeriodValue
			
		},
		showlegend : false
	};

How can i achieve that?

Thanks

That should work. Can you tell us what’s inside xPlot in your example to help us debug?

… and dtickMap for that matter?

Thank @etienne for replying .xPlot basically contains dates like [“2017-06-11”,“2017-06-10”,“2017-06-09”] .

dtickMap is an object like {1:86400000,7:786400000,15:1586400000 };

where 1,7 and 15 corresponds to number of days and 86400000 is the number of milliseconds in a day.

Hi @etienne : Did you get any clue,what is the problem with configuration ?
Thanks.

Did you figure it out?