Skip to content

Instantly share code, notes, and snippets.

@svschannak
Created August 22, 2017 12:37
Show Gist options
  • Save svschannak/fcd366952e829070aba2ca78d9086bfe to your computer and use it in GitHub Desktop.
Save svschannak/fcd366952e829070aba2ca78d9086bfe to your computer and use it in GitHub Desktop.
Progess Chart with Victory Pie and Text in the center of the pie chart
<svg width={200} height={200}>
<text x={100} y={110} textAnchor="middle" >
{this.state.metric}%
</text>
<VictoryPie
padAngle={0}
// used to hide labels
labelComponent={<span/>}
innerRadius={70}
width={200} height={200}
data={[{'key': "", 'y': this.state.metric}, {'key': "", 'y': (100-this.state.metric)} ]}
colorScale={["#19B3A6", "#EEEEEE" ]}
/>
</svg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment