Hi I am trying to change where my bars start and stop on a bar chart. My goal is to have a bar that spans the entire month. right now my code is:
cumulative = go.Bar(y=self.gb[self.y_column],
x=self.gb.index,
name='Cumulative',
hoverinfo='x+y',
hovertemplate="Month: %{x} <br>Cumulative Tank " + self.units + ": %{y}",
opacity=0.6,
marker=dict(color='rgb(158,202,225)',
line=dict(color='rgb(8,48,107)',
width=1.5,
),
)
)
and my output is:
I currently have the xtick set at the end of the month. If I can make the bars right-aligned to the xtick I can use a custom bar width to make it reach the end of the month. I don’t think I can calculate the middle day of the month, because on months with 31 days I’ll have either a one day gap or be one day over. Any help would be greatly appreciated!
I also posted this on stackoverflow:https://stackoverflow.com/questions/56030852/set-alignment-for-plotly-bar-graph-x-axis