如何在VictoryPie标签和图表之间添加连接线

时间:2019-02-22 22:01:29

标签: javascript css reactjs charts victory-charts

我想创建连接标签和与之相关的饼图中心的线。

问题不是编辑标签的内容,而是知道如何将线连接到图表饼图的相对位置。

<VictoryPie
  data={[
    { x: 1, y: 2, label: "one" },
    { x: 2, y: 3, label: "two" },
    { x: 3, y: 5, label: "three" }
  ]}
/>

以上内容直接取自victory charts docs,labelComponent可用于设置标签样式。

0 个答案:

没有答案