-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fixed rotateLabels option for multiBarCharts #6
Conversation
Replaced 'text-transform' with correct attribute 'text-anchor' to set rotation center of labels.
I have merged your request on http://github.com/novus/nvd3/pull/63 (you can get it through my fork http://github.com/arlm/nvd3/tree/aggregated-pull-requests ) |
Hey, sorry for the delay, I'll work on getting all the pull requests merged in over the weekend |
I was looking at this change and it's an improvement, but a more complete solution should correct the x/y offset of the label as it rotates so that the root of the label is centered on the tick and it maintains the same amount of padding from the axis itself. Otherwise the labels are offset to the left of center as the rotate angle gets closer to 90 degrees (and the anchor of the labels butt up against the axis). You can see this in the image I attached. If I get a working patch that does these things, I'll put in a pull request and add another comment to this thread. edit: After doing some looking, you can remove all the special handling that's in the multibar chart and just pass through the rotateLabels setting to the x axis (there's existing code in there to handle the rotation of the category labels). But, it still has the issue I mention that it doesn't center the label on the tick. |
Fixed rotateLabels option for multiBarCharts
A good temporary fix until the issue reblace mentioned can be addressed. |
Historical bar chart/canvas
…Chart State manager/multibar horizontal chart
fix line chart performance issue (novus/nvd3#6...
elementClick and elementDblClick events attached to path Apparently attaching them to a <g> container made them not work properly.
Fix a crash when updating a pie chart whilst it is tweening
Replaced 'text-transform' with correct attribute 'text-anchor' to set
rotation center of labels.