diff --git a/ui/app/components/line-chart.js b/ui/app/components/line-chart.js index 5acf3f94e..ab934f3bc 100644 --- a/ui/app/components/line-chart.js +++ b/ui/app/components/line-chart.js @@ -357,6 +357,13 @@ export default class LineChart extends Component { } } + @action + recomputeYAxis(el) { + if (!this.isDestroyed && !this.isDestroying) { + d3.select(el.querySelector('.y-axis')).call(this.yAxis); + } + } + mountD3Elements() { if (!this.isDestroyed && !this.isDestroying) { d3.select(this.element.querySelector('.x-axis')).call(this.xAxis); diff --git a/ui/app/templates/components/line-chart.hbs b/ui/app/templates/components/line-chart.hbs index f669bd202..d407f3e34 100644 --- a/ui/app/templates/components/line-chart.hbs +++ b/ui/app/templates/components/line-chart.hbs @@ -4,6 +4,7 @@ {{did-insert this.onInsert}} {{did-update this.renderChart}} {{did-update this.recomputeXAxis this.xScale}} + {{did-update this.recomputeYAxis this.yScale}} {{window-resize this.updateDimensions}}> {{this.title}}