Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion grouped-categories.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@
}
}

function textPxLength(label) {
return Math.abs(label.rotation) === 90 ? label.getBBox().height : label.getBBox().width;
}

//
// Axis prototype
//
Expand Down Expand Up @@ -390,7 +394,7 @@
}));

//update with new text length, since textSetter removes the size caches when text changes. #137
tick.label.textPxLength = tick.label.getBBox().width;
tick.label.textPxLength = textPxLength(tick.label);
}

// create elements for parent categories
Expand Down