在圆圈外显示旭日图的标签

问题描述

我正在尝试绘制旭日图,但有些项目太小而无法看到。

例如:此代码...

fig =go.figure(go.Sunburst(
    labels=[ "Eve","Cain","Seth","Enos","Noam","Abel","Awan","Enoch","Azura"],parents=["","Eve","Eve" ],values=[  65,1,12,10,2,25,6,4,1],branchvalues="total",sort = False
))

...给我:

enter image description here

我可以隐藏这样的小项目:

fig.update_layout(
    title_text=f"biblical family",uniformtext=dict(minsize=8,mode='hide'),width=900,height=700
)

但我更愿意向他们展示更多这样的内容

enter image description here

这里,我使用了 fig.add_annotation

fig.add_annotation(
    text=f'Azura',xanchor='right',x=0.41,y=0.21,ax=-100,ay=90)

但是,有没有办法显示小到无法打印在图表之外的外部项目?无需手工操作:p

或者至少,捕捉每个切片的中心位置,这样我就可以自动使用 fig.add_annotation ? :D

非常感谢:D

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)