VictoryPie curved text labels #405
Labels
Issue: Accepted
The submitted issue has been confirmed by the Victory core team
Type: Enhancement ✏️
An enhancement or feature proposal that will be addressed after the next release
I would like to have curved text labels on a pie chart. I spoke both @boygirl and Jani about this at a recent meetup.
I am more than happy to contribute, but as I mentioned I am not sure how best this would fit in.
I created a pen that shows a basic example of this.
The most important bit is this snippet which creates the segments.
One thing to note is that I had to figure out was how to get this to work when you have HTML5 based navigation. I originally had
xlinkHref={
#${id}-${i}}
and it worked fine with hashbang navigation, but broke when used with HTML5 based navigation.I am not an SVG wiz so not sure if there is a better way to fix it, but I ended up having to prepend
${window.location.href.replace(window.location.hash, "")}
to thexlinkHref
. (see here)(example pie chart)
The text was updated successfully, but these errors were encountered: