I'm having trouble adding text to center the pie chart, I'm using novio.rocks for my react project. Thanks Demo https://nivo.rocks/pie
您可以在图表顶部添加一个额外的div,使用flexbox将其内容居中放置,我已经在codeandbox => https://codesandbox.io/s/w27xwy0xlk上创建了这种方法的示例。别忘了添加pointer-events: none
以保持图表的交互性。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.