mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
fixing based on Spencers comments
This commit is contained in:
parent
8324f5a83e
commit
b4780fe04b
1 changed files with 4 additions and 3 deletions
|
@ -116,7 +116,7 @@ export default function HandlerBaseClass(Private) {
|
|||
});
|
||||
|
||||
// render the chart(s)
|
||||
this.loadedCount = 0;
|
||||
let loadedCount = 0;
|
||||
const chartSelection = selection.selectAll('.chart');
|
||||
chartSelection.each(function (chartData) {
|
||||
const chart = new self.ChartClass(self, this, chartData);
|
||||
|
@ -126,8 +126,9 @@ export default function HandlerBaseClass(Private) {
|
|||
});
|
||||
|
||||
chart.events.on('rendered', () => {
|
||||
self.loadedCount++;
|
||||
if (self.loadedCount === chartSelection.length) {
|
||||
loadedCount++;
|
||||
if (loadedCount === chartSelection.length) {
|
||||
// events from all charts are propagated to vis, we only need to fire renderComplete on one (first)
|
||||
charts[0].events.emit('renderComplete');
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue