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

How does plotly choose tickvals if x and y are strings?

How does plotly choose tickvals if x and y are strings? I am trying to set ticktext but it won’t show up if I don’t set the tickvals as well. But there are no tickvals because I never made any numeric data. It seems that the tickvals are between 2002 and 2012, but I never set that. How does this happen so I can determine what tickvals to set?

EDIT: I realized plotly was reading my strings as dates.

EDIT2: How do you stop plotly from interpreting the string as date?

Add type = ‘category’ in the layout axis