mirror of https://github.com/snachodog/mybuddy.git
Update graph colors to match site theme colors.
This commit is contained in:
parent
48d5f17646
commit
a38c77a7c1
|
@ -38,6 +38,7 @@ def diaperchange_lifetimes(child):
|
||||||
)
|
)
|
||||||
|
|
||||||
layout_args = utils.default_graph_layout_options()
|
layout_args = utils.default_graph_layout_options()
|
||||||
|
layout_args['height'] = 800
|
||||||
layout_args['title'] = '<b>Diaper Lifetimes</b><br>{}'.format(child)
|
layout_args['title'] = '<b>Diaper Lifetimes</b><br>{}'.format(child)
|
||||||
layout_args['yaxis']['title'] = 'Time between changes (hours)'
|
layout_args['yaxis']['title'] = 'Time between changes (hours)'
|
||||||
layout_args['yaxis']['zeroline'] = False
|
layout_args['yaxis']['zeroline'] = False
|
||||||
|
@ -242,7 +243,7 @@ def sleep_pattern(child):
|
||||||
showlegend=False,
|
showlegend=False,
|
||||||
))
|
))
|
||||||
if color == 'rgba(255, 255, 255, 0)':
|
if color == 'rgba(255, 255, 255, 0)':
|
||||||
color = 'rgb(0, 0, 255)'
|
color = 'rgb(35, 110, 150)'
|
||||||
else:
|
else:
|
||||||
color = 'rgba(255, 255, 255, 0)'
|
color = 'rgba(255, 255, 255, 0)'
|
||||||
|
|
||||||
|
@ -252,7 +253,7 @@ def sleep_pattern(child):
|
||||||
layout_args['barmode'] = 'stack'
|
layout_args['barmode'] = 'stack'
|
||||||
layout_args['hovermode'] = 'closest'
|
layout_args['hovermode'] = 'closest'
|
||||||
layout_args['title'] = '<b>Sleep Pattern</b><br>{}'.format(child)
|
layout_args['title'] = '<b>Sleep Pattern</b><br>{}'.format(child)
|
||||||
layout_args['height'] = 600
|
layout_args['height'] = 800
|
||||||
|
|
||||||
layout_args['xaxis']['title'] = 'Date'
|
layout_args['xaxis']['title'] = 'Date'
|
||||||
layout_args['xaxis']['tickangle'] = -65
|
layout_args['xaxis']['tickangle'] = -65
|
||||||
|
|
|
@ -6,8 +6,10 @@ def default_graph_layout_options():
|
||||||
"""Default layout options for all graphs.
|
"""Default layout options for all graphs.
|
||||||
"""
|
"""
|
||||||
return {
|
return {
|
||||||
|
'paper_bgcolor': 'rgb(52, 58, 64)',
|
||||||
|
'plot_bgcolor': 'rgb(52, 58, 64)',
|
||||||
'font': {
|
'font': {
|
||||||
'color': 'rgba(0, 0, 0, 1)',
|
'color': 'rgba(255, 255, 255, 1)',
|
||||||
# Bootstrap 4 font family.
|
# Bootstrap 4 font family.
|
||||||
'family': '-apple-system, BlinkMacSystemFont, "Segoe UI", '
|
'family': '-apple-system, BlinkMacSystemFont, "Segoe UI", '
|
||||||
'Roboto, "Helvetica Neue", Arial, sans-serif, '
|
'Roboto, "Helvetica Neue", Arial, sans-serif, '
|
||||||
|
@ -15,16 +17,20 @@ def default_graph_layout_options():
|
||||||
'"Segoe UI Symbol"',
|
'"Segoe UI Symbol"',
|
||||||
'size': 14,
|
'size': 14,
|
||||||
},
|
},
|
||||||
'margin': {'b': 40, 't': 80},
|
'margin': {'b': 80, 't': 80},
|
||||||
'xaxis': {
|
'xaxis': {
|
||||||
'titlefont': {
|
'titlefont': {
|
||||||
'color': 'rgba(0, 0, 0, 0.54)'
|
'color': 'rgba(255, 255, 255, 0.5)'
|
||||||
}
|
},
|
||||||
|
'gridcolor': 'rgba(0, 0, 0, 0.25)',
|
||||||
|
'zerolinecolor': 'rgba(0, 0, 0, 0.5)'
|
||||||
},
|
},
|
||||||
'yaxis': {
|
'yaxis': {
|
||||||
'titlefont': {
|
'titlefont': {
|
||||||
'color': 'rgba(0, 0, 0, 0.54)'
|
'color': 'rgba(255, 255, 255, 0.5)'
|
||||||
}
|
},
|
||||||
|
'gridcolor': 'rgba(0, 0, 0, 0.25)',
|
||||||
|
'zerolinecolor': 'rgba(0, 0, 0, 0.5)'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,6 +39,8 @@ def rangeselector_date():
|
||||||
"""Graph date range selectors settings for 1w, 2w, 1m, 3m, and all.
|
"""Graph date range selectors settings for 1w, 2w, 1m, 3m, and all.
|
||||||
"""
|
"""
|
||||||
return {
|
return {
|
||||||
|
'bgcolor': 'rgb(35, 149, 86)',
|
||||||
|
'activecolor': 'rgb(25, 108, 62)',
|
||||||
'buttons': [
|
'buttons': [
|
||||||
{
|
{
|
||||||
'count': 7,
|
'count': 7,
|
||||||
|
|
Loading…
Reference in New Issue