mirror of https://github.com/snachodog/mybuddy.git
Remove padding and borders from Sleep Pattern graph
This commit is contained in:
parent
4915f809e6
commit
4d74df27d9
|
@ -113,6 +113,7 @@ def sleep_pattern(instances):
|
||||||
text=text_df.iloc[index],
|
text=text_df.iloc[index],
|
||||||
hoverinfo='text',
|
hoverinfo='text',
|
||||||
marker={'color': color},
|
marker={'color': color},
|
||||||
|
marker_line_width=0,
|
||||||
showlegend=False,
|
showlegend=False,
|
||||||
))
|
))
|
||||||
if color == 'rgba(255, 255, 255, 0)':
|
if color == 'rgba(255, 255, 255, 0)':
|
||||||
|
@ -124,6 +125,7 @@ def sleep_pattern(instances):
|
||||||
layout_args['margin']['b'] = 100
|
layout_args['margin']['b'] = 100
|
||||||
|
|
||||||
layout_args['barmode'] = 'stack'
|
layout_args['barmode'] = 'stack'
|
||||||
|
layout_args['bargap'] = 0
|
||||||
layout_args['hovermode'] = 'closest'
|
layout_args['hovermode'] = 'closest'
|
||||||
layout_args['title'] = _('<b>Sleep Pattern</b>')
|
layout_args['title'] = _('<b>Sleep Pattern</b>')
|
||||||
layout_args['height'] = 800
|
layout_args['height'] = 800
|
||||||
|
@ -139,7 +141,7 @@ def sleep_pattern(instances):
|
||||||
ticks[i] = (start + timezone.timedelta(minutes=i)).strftime('%I:%M %p')
|
ticks[i] = (start + timezone.timedelta(minutes=i)).strftime('%I:%M %p')
|
||||||
|
|
||||||
layout_args['yaxis']['title'] = _('Time of day')
|
layout_args['yaxis']['title'] = _('Time of day')
|
||||||
layout_args['yaxis']['rangemode'] = 'tozero'
|
layout_args['yaxis']['range'] = [0, 24*60]
|
||||||
layout_args['yaxis']['tickmode'] = 'array'
|
layout_args['yaxis']['tickmode'] = 'array'
|
||||||
layout_args['yaxis']['tickvals'] = list(ticks.keys())
|
layout_args['yaxis']['tickvals'] = list(ticks.keys())
|
||||||
layout_args['yaxis']['ticktext'] = list(ticks.values())
|
layout_args['yaxis']['ticktext'] = list(ticks.values())
|
||||||
|
|
Loading…
Reference in New Issue