Skip to content
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

Merged
merged 1 commit into from
Apr 3, 2013
Merged

Fixed rotateLabels option for multiBarCharts #6

merged 1 commit into from
Apr 3, 2013

Conversation

kapexx
Copy link

@kapexx kapexx commented Nov 24, 2012

Replaced 'text-transform' with correct attribute 'text-anchor' to set
rotation center of labels.

Replaced 'text-transform' with correct attribute 'text-anchor' to set
rotation center of labels.
@kapexx
Copy link
Author

kapexx commented Nov 25, 2012

Currently rotated labels are broken.
broken rotation
Commit fixed that:
fixed rotation

@arlm
Copy link
Contributor

arlm commented Feb 7, 2013

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 )

@bobmonteverde
Copy link
Contributor

Hey, sorry for the delay, I'll work on getting all the pull requests merged in over the weekend

@reblace
Copy link

reblace commented Feb 23, 2013

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.

multibar

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.

twolfnovus added a commit that referenced this pull request Apr 3, 2013
Fixed rotateLabels option for multiBarCharts
@twolfnovus twolfnovus merged commit fb8bfe4 into novus:master Apr 3, 2013
@twolfnovus
Copy link
Contributor

A good temporary fix until the issue reblace mentioned can be addressed.

kashesandr pushed a commit to kashesandr/nvd3 that referenced this pull request Mar 11, 2014
fshao816 added a commit that referenced this pull request Jun 13, 2014
…Chart

State manager/multibar horizontal chart
Leemoonsoo added a commit to ZEPL/zeppelin that referenced this pull request Nov 21, 2014
robinfhu pushed a commit that referenced this pull request Feb 5, 2015
elementClick and elementDblClick events attached to path

Apparently attaching them to a <g> container made them not work properly.
huttli pushed a commit to huttli/nvd3 that referenced this pull request Jul 18, 2016
Fix a crash when updating a pie chart whilst it is tweening
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants