fix missing axis labels when changing vertical bar chart to horizontal bar chart (#32628) (#32876)

This commit is contained in:
Tim Roes 2019-03-11 10:45:05 +01:00 committed by GitHub
parent c625fa086d
commit 71d981762d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -106,7 +106,7 @@ export function VislibAxisLabelsProvider() {
selection.selectAll('.tick text')
.text(function (d) {
const par = d3.select(this.parentNode).node();
const myPos = scaleStartPad + (config.isHorizontal() ? self.axisScale.scale(d) : maxSize - self.axisScale.scale(d));
const myPos = scaleStartPad + self.axisScale.scale(d);
const mySize = (config.isHorizontal() ? par.getBBox().width : par.getBBox().height) * padding;
const halfSize = mySize / 2;