How to increase size of pie chart

Here is what my pie chart looks like:

The pie takes up a very small amount of my Div. Without increasing the size of the Div, how can I increase the size of the pie chart?

Thanks for any help.

Hi @Jfrick100 you can reduce the margins as in

import plotly.graph_objects as go

labels = ['Oxygen','Hydrogen','Carbon_Dioxide','Nitrogen']
values = [4500, 2500, 1053, 500]

fig = go.Figure(data=[go.Pie(labels=labels, values=values)])
fig.update_layout(margin=dict(t=0, b=0, l=0, r=0))
fig.show()

It worked beautifully. Thank you.

1 Like