mirror of
https://github.com/kemko/nomad.git
synced 2026-01-04 09:25:46 +03:00
Recompute Y Axis on data change (#15381)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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}}>
|
||||
<svg data-test-line-chart aria-labelledby="{{this.titleId}}" aria-describedby="{{this.descriptionId}}">
|
||||
<title id="{{this.titleId}}">{{this.title}}</title>
|
||||
|
||||
Reference in New Issue
Block a user