当您将鼠标悬停在绘图条形图中的条形图上时出现的小标记,如下所示: https://plot.ly/create/?fid=jordanpeterson:380#/ 名称读取跟踪0、跟踪1等
它是使用布局中的name=uuuuuuuuuuuuuuu标签控制的。
我想改变这些字体的颜色,或者改变一般的字体。而且,理想情况下,我想控制在那里允许多少字符,因为我的被切断了。
通过来自社区的empet plotly->使用hoverlabel更新每个跟踪
hoverlabel=dict(bgcolor='set_your_preferred_background_color', font=dict(family='Balto', #or other font family size=11, #or other size color='font_color') )
参见: https://plot.ly/python/reference/#bar-hoverlabel .