Skip to content

Commit

Permalink
Fix vertical categorical axis bug
Browse files Browse the repository at this point in the history
  • Loading branch information
keller-mark committed Nov 13, 2018
1 parent bba6f70 commit 02a9c9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "vue-declarative-plots",
"version": "1.2.8",
"version": "1.2.9",
"private": false,
"scripts": {
"serve": "vue-cli-service serve --open ./examples-src/index.js",
Expand Down
10 changes: 6 additions & 4 deletions src/components/axes/Axis.vue
Expand Up @@ -326,10 +326,12 @@ export default {
const axisBboxZoomedIn = container.select(".axis-zoomed-in").node().getBBox();
if(varScale instanceof CategoricalScale) {
const barWidth = vm.pWidth / varScale.domainFiltered.length;
if(barWidth < textBboxZoomedIn.height) {
ticksZoomedIn.selectAll("text")
.remove();
if(vm._orientation === ORIENTATIONS.HORIZONTAL) {
const barWidth = vm.pWidth / varScale.domainFiltered.length;
if(barWidth < textBboxZoomedIn.height) {
ticksZoomedIn.selectAll("text")
.remove();
}
}
}
Expand Down

0 comments on commit 02a9c9e

Please sign in to comment.