mirror of
https://github.com/Sosokker/Packaged-Food-Explorer.git
synced 2025-12-19 05:04:06 +01:00
change title + change min_size
This commit is contained in:
parent
156cd3ba56
commit
aee51410ed
@ -40,7 +40,7 @@ class plotter:
|
|||||||
yaxis_title='Value')
|
yaxis_title='Value')
|
||||||
elif chart_type == 'pie':
|
elif chart_type == 'pie':
|
||||||
fig = go.Figure(data=go.Pie(labels=nutrient_names, values=nutrient_values))
|
fig = go.Figure(data=go.Pie(labels=nutrient_names, values=nutrient_values))
|
||||||
fig.update_layout(title=f'Nutrient of {product_name}')
|
fig.update_layout(title=f'Nutrient Ratio')
|
||||||
elif chart_type == 'barpie':
|
elif chart_type == 'barpie':
|
||||||
fig = make_subplots(rows=2, cols=2, specs=[[{"type": "xy"}, {"type": "domain"}], [{}, {}]])
|
fig = make_subplots(rows=2, cols=2, specs=[[{"type": "xy"}, {"type": "domain"}], [{}, {}]])
|
||||||
fig.add_trace(go.Pie(labels=nutrient_names, values=nutrient_values),
|
fig.add_trace(go.Pie(labels=nutrient_names, values=nutrient_values),
|
||||||
@ -60,7 +60,7 @@ class plotter:
|
|||||||
print(filename)
|
print(filename)
|
||||||
temp.write(encoded_html)
|
temp.write(encoded_html)
|
||||||
temp.close()
|
temp.close()
|
||||||
webview.create_window('Nutrients Graph', filename)
|
webview.create_window('Nutrients Graph', filename, min_size=(600,500))
|
||||||
webview.start()
|
webview.start()
|
||||||
os.remove(filename)
|
os.remove(filename)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user