Skip to content

Commit 940e3a5

Browse files
authored
Handle selection change properly. (#330)
Handle selection changed every time on chart ready instead of just once on type change.
1 parent 8d0d2b8 commit 940e3a5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

google-chart.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,9 @@ export class GoogleChart extends LitElement {
362362
this.typeChanged();
363363
google.visualization.events.addListener(chartWrapper, 'ready', () => {
364364
this.drawn = true;
365+
if (this.selection) {
366+
this.selectionChanged();
367+
}
365368
});
366369
google.visualization.events.addListener(
367370
chartWrapper, 'select', () => {
@@ -402,9 +405,6 @@ export class GoogleChart extends LitElement {
402405
if (!stylesDiv.children.length) {
403406
this.localizeGlobalStylesheets(stylesDiv);
404407
}
405-
if (this.selection) {
406-
this.selectionChanged();
407-
}
408408
});
409409
this.redraw();
410410
}

0 commit comments

Comments
 (0)