Hi,
I am plotting a bar graph and passing the date as per the format on x axis. On Y axis I am plotting 4 bars per week and graph has 12 week data.
My problem is plotly don’t show all the values passed on x axis. 1 tick for 2 weeks is shown. Plus some bars are zero as well. It is really hard to see from where to where the tick belongs. Right Now my graph looks like this.
I want layout such that values are not skipped on x axis plus It can be easily seen these bars belong to this week. Either by kind of markers like this
|____________|
18-05-09
my graph layout right now is something like :
xaxis={
‘tickformat’: ‘%y/%m/%d’,
‘tickmode’: ‘array’,
‘tickangle’: ‘45’
}
xaxis = {
'tickformat': '%Y-%m-%d',
'tickmode': 'auto',
'nticks': value, [where value is the max # of ticks]
'tick0': value, [where value is the first tick]
'dtick': value [where value is the step between ticks]
}
See here for reference. Also, a great way to quickly test these changes is to open the chart in the chart studio by clicking the ‘Edit in Chart Studio’ button in the modebar.
Can you clarify what we would use for the dtick value? Let’s say we want 7-day spacing. Would it be timedelta(days=7)? 7? Some other value? I can’t seem to get it to work with either of those values.