codesuki / react-d3-components

D3 Components for React
http://codesuki.github.io/react-d3-components/example.html
MIT License
1.63k stars 206 forks source link

pie charts label overlapping and label hidden #131

Closed viveknaragude closed 6 years ago

viveknaragude commented 7 years ago

1 2 the issues regarding pie charts label overlapping and label hidden help me if it is not issue and how i can fix it

codesuki commented 7 years ago

Interesting problem! I will try to reproduce it and find a fix. Probably have to change the labeling code.

viveknaragude commented 7 years ago

Hi codesuki you can change the labeling code.

codesuki commented 7 years ago

Sorry, not yet :( I am totally swamped by work.

codesuki commented 7 years ago

Could you solve the problem by making the pie chart bigger? The only solutions that come to mind are hiding overlapping labels or making the chart bigger.

viveknaragude commented 7 years ago

just told me can i do this change in which file

viveknaragude commented 7 years ago

making the chart bigger is not good solution

codesuki commented 7 years ago

You could fork and play around with src/PieChart.jsx to see if you get some better results.

viveknaragude commented 7 years ago

ok Thank You..

Bopaiah-MD commented 6 years ago

@viveknaragude @codesuki is there a fix for this ?

codesuki commented 6 years ago

Maybe here: https://github.com/thomasdashney/react-d3-components/commit/c1486eb4b54e2554ef773297583dd02c0f9c5c68

@thomasdashney any chance for a pull request?

codesuki commented 6 years ago

I pushed the fix. Version 0.6.7.

thomasdashney commented 6 years ago

@codesuki :+1: I don't think it's a great solution, but I do think it's better than having no safeguard

codesuki commented 6 years ago

@thomasdashney good job! I hope it's okay I integrated your idea there.

Bopaiah-MD commented 6 years ago

will see in the Version 0.6.7 , thanks @codesuki for responding

codesuki commented 6 years ago

That would be a good thing to have. I personally always play around in the example file.

codesuki commented 6 years ago

https://jsfiddle.net/3a7s0r1q/1/

Bopaiah-MD commented 6 years ago

thanks for the fiddle :+1:

codesuki commented 6 years ago

It's still using the old version. Will update it in a second.

viveknaragude commented 6 years ago

@MDB-20 please update your version its fix (thomasdashney/react-d3-components@c1486eb)

codesuki commented 6 years ago

@viveknaragude it's fixed now in 0.6.7

carly-rw commented 5 years ago

Can we look into this again? Related to https://github.com/codesuki/react-d3-components/issues/172, this doesn't seem like the optimal behavior in pie charts in which visually there is clearly enough space for multiple labels to appear close to each other.