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

This commit is contained in:
Joe Reuter 2019-03-11 09:44:38 +01:00 committed by Tim Roes
parent 319921ebfc
commit e2e55bc08c

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;