Plotly (Dash) tick label overwriting

Viewed 3957

I cannot get the following to plot the ticklabels

self.months = [2017-01-01', 2017-02-01', ...]



def plot_bar(self):
        print self.data
        app.layout = html.Div(children=[html.H1(children=''), html.Div(children='Discovered monthly'),
        dcc.Graph(
            figure=go.Figure(
            data = self.data,
            layout=go.Layout(
                title='Streams', showlegend=True, barmode='stack', margin=go.Margin(l=200, r=0, t=40, b=20),
                xaxis=dict(tickvals = self.months, ticktext = self.months, title='months')
                )
            ),
        style={'height': 300},
        id='my-graph')
        ])

So basically I have a numerical representation of the a bar chart, however when I change the tick values and ticklabels, those numerical labels dissappear, however I do not see the dates that I would be expected to be there. Am I missing a switch to display these labels?

1 Answers
Related