Skip to content

Commit

Permalink
Fix event charts to render with vega (#4443)
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Ohlsen <[email protected]>
  • Loading branch information
ohltyler authored Jun 29, 2023
1 parent f028e8d commit 70a9ee0
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,12 @@ export class VisualizeEmbeddable
const abortController = this.abortController;

// By waiting for this to complete, this.visLayers will be populated.
// Note we only fetch when in the context of a dashboard - we do not
// show events or have event functionality when in the vis edit view.
const isInDashboard = this.parent?.type === DASHBOARD_CONTAINER_TYPE;
if (isInDashboard) {
// Note we only fetch when in the context of a dashboard or in the view
// events flyout - we do not show events or have event functionality when
// in the vis edit view.
const shouldFetchVisLayers =
this.parent?.type === DASHBOARD_CONTAINER_TYPE || this.visAugmenterConfig?.inFlyout;
if (shouldFetchVisLayers) {
await this.populateVisLayers();
}

Expand Down

0 comments on commit 70a9ee0

Please sign in to comment.