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

Nested labels can use more space in inverted chart #81

Open
xyzisinus opened this issue Feb 9, 2016 · 0 comments
Open

Nested labels can use more space in inverted chart #81

xyzisinus opened this issue Feb 9, 2016 · 0 comments
Assignees

Comments

@xyzisinus
Copy link

First, many thanks for sharing this very handy tool! However, I found the labels at different nesting levels are a bit too cozy together in an inverted chart. See image below (ignore the button please):

http://postimg.org/image/ersnz0gc1/

With the following change:

     // set level size
-    axis.groupSize(depth, tick.label.getBBox()[size]);
+    var somePadding = 0;
+    if (size === 'width') {
+      // space out a bit for inverted chart (with categories
+      // at the side) to fit nested category labels better
+      somePadding = 10;
+    }
+    axis.groupSize(depth, tick.label.getBBox()[size] + somePadding);
 

The rendering is better spaced (see image below). Since I suspect this is not the right fix it I'll leave it to the experts, instead of submitting a pull request. Thank you again!

http://postimg.org/image/e0zxt8dyp/

@KacperMadej KacperMadej self-assigned this Feb 12, 2016
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

No branches or pull requests

2 participants