Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

X-coordinates in Data Format

Hi

I am displaying Month and Year in a xaxis. I want to display all the months in order from Jan to Dec.

I have tried to convert date to JS dates. Its works fine. But My issue is after converting to date in my x axis all the x axis values are not displaying.

Example.
I have ‘Jan-2015’, ‘Feb-2015’, ‘Apr-2015’, ‘Aug-2015’, ‘Mar-2015’, ‘May-2015’ values as my x-axis values. But Its displaying only ‘Jan-2015’,‘Mar-2015’, ‘May-2015’,‘Jul-2015’

‘Feb-2015’,‘Apr-2015’ is not displaying in X-Axis.

I Don’t have 'July-2015’ Data but its displaying in X-Axis label

Below is the code pen for the same.

The easiest way to do this at the moment would be to use the tickvals and ticktext axis attributes:

Oops. Forgot to paste the pen:

http://codepen.io/etpinard/pen/jqEPyg?