How to embed a power-chart into a view most efficiently?

Hello, I have a main dashboard view which consists of three columns which shows live data. We want the ability to look at a historical view of that data. At the moment the way I'm doing this is by embedding three views with power-charts in the page and then hiding them with CSS. Users can then expand and collapse the views to show the charts.

This isn't very efficient as the charts are still loading in the background and hitting the page's performance.

Is there a way to inject / embed a power-chart after a user has performed an action (clicked a button)? I'd then want to remove the chart from the view when the user has finished looking at it.

Change the path of the embedded view to an empty string when you don't need it, and/or set display to none. That should get you there.

Seems to work a charm - thank you!

1 Like