IBM / dse-do-dashboard

Plotly/Dash dashboard for Decision Optimization projects in IBM Cloud Pak for Data
Apache License 2.0
4 stars 3 forks source link

Better support interactive VisualizationPage - keep PlotlyManager #17

Open victorterpstra opened 2 years ago

victorterpstra commented 2 years ago

When using interactive components on a VisualizationPage, the callback will need to get access to the PlotlyManager. We need a mechanism to retain the original PlotlyManager, so we don't have to re-generate.

Work-around:

Define a VisualizationPage.get_plotly_manager() -> Optional[PlotlyManager] And store the pm in the VisualizationPage when the pm gets created in VisualizationPage.get_layout

victorterpstra commented 2 years ago

In v0.1.1.1b, added self.pm to VisualizationPage.get_layout. So later we can get it back using self.pm.