Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Can I add padding to titles in Pie Chart subplots?

When creating subplots for pie charts, I would like to add padding to subplot titles. An example of what I tried is here: https://codepen.io/mtadams007/pen/zYGYOWR?editors=0010

I saw that there is a workaround by using annotations here:

I’d rather compute the titles in the data as opposed to the layout as the title is dependent on the data. Is there something I’m missing? If we aren’t able to add padding to the title, is there a way to add it in a coming release?

Thanks

@ mad, as far as I know, padding can be added to title by adding padding to the dcc.Graph component. As a side effect, the padding will apply to everything in the graph. You can try if it works for you. I don’t think you can apply padding to just the title.
dcc.Graph(… , style={‘padding’:‘10px’})