- plotting_area_trending = self._plotting_area_trending(
- store_sel,
- bool(ctrl_panel.get("cl-normalize-val"))
- )
- if on_draw[1]: # Telemetry
- tm_graphs = list()
- for panel, aio in zip(tm_panels, tm_all_in_one):
- tm_graphs.append(graph_tm_trending(
- tm.select_tm_trending_data(panel),
+ if store["trending-graphs"]:
+ graphs = store["trending-graphs"]
+ else:
+ graphs = graph_trending(
+ self._data,
+ store_sel,
+ self._graph_layout,
+ bool(ctrl_panel.get("cl-normalize-val"))
+ )
+ if graphs and graphs[0]:
+ store["trending-graphs"] = graphs
+ plotting_area_trending = \
+ Layout._plotting_area_trending(graphs)
+
+ # Telemetry
+ start_idx = len(store["telemetry-graphs"])
+ end_idx = len(tm_panels)
+ if not end_idx:
+ plotting_area_telemetry = C.PLACEHOLDER
+ elif on_draw[1] and (end_idx >= start_idx):
+ if len(tm_all_in_one) != end_idx:
+ tm_all_in_one = [[None], ] * end_idx
+ if len(tm_ignore_host) != end_idx:
+ tm_ignore_host = [[None], ] * end_idx
+ for idx in range(start_idx, end_idx):
+ store["telemetry-graphs"].append(graph_tm_trending(
+ tm.select_tm_trending_data(
+ tm_panels[idx],
+ ignore_host=bool(tm_ignore_host[idx][0])
+ ),