Hey,
I am plotting multiple pie charts (for example https://plot.ly/python/pie-charts/ - second chart),
any idea how do I add subtitle to each pie?
I donโt mean a title for the whole page.
Thanks!
Hey,
I am plotting multiple pie charts (for example https://plot.ly/python/pie-charts/ - second chart),
any idea how do I add subtitle to each pie?
I donโt mean a title for the whole page.
Thanks!
You should use annotations for this task: https://plot.ly/python/text-and-annotations/
Iโve just been resolving the same issue and one thing itโs useful to add here is that you can use relative location to define where to put the titles on each chart.
For example, I have two charts, one in x domain [0,48] and the other in [0.51,1] and I used the code below which seems to do a decent job of aligning the subtitle to the right place
layout.update(dict(annotations= [{'x': 0.24, 'y':0.95
,'text': 'Previous 30 Days'
,'font': { 'color': 'rgb(55, 128, 191)', 'size': 14}
,'showarrow':False, 'xanchor':'center' },
{'x': 0.76, 'y':0.95
,'text': 'Last 30 Days'
,'font': { 'color': 'rgb(55, 128, 191)', 'size': 14}
,'showarrow':False, 'xanchor':'center' } ]))