-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lines between labels and slices #363
Comments
I was surprised to discover this was not possible when looking at the label styling. Can anybody speak to the place that might be appropriate for adding support for this in the code? Part of Thanks! |
Digging down, I think I'd start poking around the Since we have the label |
How can we use @BrendanFDMoore ? Could you give a example? |
Unfortunately I can't, @ngocht143 - sorry. The above was my initial investigation to determine if it would be feasible to extend this functionality to meet a requirement. I determined it should be possible to shoehorn in without too much trouble, but never actually did the work. We made the case for adjusting the requirements instead, so we no longer needed this capability. Good luck! And if you do make the changes, I'd be happy to review the PR back to victory 👍 |
I'm trying to implement something like this with a custom LabelComponent. This component receives the x and y coordinates as props, but how do I go about positioning them correctly? I draw a line from the pie center to the x and y coordinates, but I want my actual label to be aligned with this. It also needs to be further away but I can't figure out the math for this. I've tried looking at the source for the label components and there seems to be a function the calculate the position, but I can't figure out what props it needs etc. Any ideas? |
@antonbehaeghe I've made demo Things you looking for in Actually it will be cool if Chart by default passed coordinates of chart's center to I hope this demo will help someone, who struggling with drawing lines from chart to labels |
Beautiful @DraGonM thank you very much |
Would love to see this implemented |
@DraGonM |
@trancongdung12 Hey, I didn't work with charts for a long time, so it's not an ideal solution, but I think you can check this fork of the solution above https://codesandbox.io/s/basic-victory-example-forked-b090ed?file=/LabelLine.js but basically, I just added one more point to |
Polyline will be tracked #2820 |
From @ekmartin on July 14, 2016 21:14
Would be nice if there was an option to enable indicator lines between the labels and the chart. Makes it a lot easier to see what labels belong to what slice.
Example (taken from react-d3):
Copied from original issue: FormidableLabs/victory-pie#106
The text was updated successfully, but these errors were encountered: