diff options
Diffstat (limited to 'resources/tools/dash')
-rw-r--r-- | resources/tools/dash/app/pal/trending/graphs.py | 6 | ||||
-rw-r--r-- | resources/tools/dash/app/pal/trending/layout.py | 19 | ||||
-rw-r--r-- | resources/tools/dash/app/pal/trending/layout.yaml | 10 |
3 files changed, 19 insertions, 16 deletions
diff --git a/resources/tools/dash/app/pal/trending/graphs.py b/resources/tools/dash/app/pal/trending/graphs.py index dc4e7afca8..4273d9d2f8 100644 --- a/resources/tools/dash/app/pal/trending/graphs.py +++ b/resources/tools/dash/app/pal/trending/graphs.py @@ -386,11 +386,6 @@ def graph_hdrh_latency(data: dict, layout: dict) -> go.Figure: fig = None - try: - name = data.pop("name") - except (KeyError, AttributeError): - return None - traces = list() for idx, (lat_name, lat_hdrh) in enumerate(data.items()): try: @@ -450,7 +445,6 @@ def graph_hdrh_latency(data: dict, layout: dict) -> go.Figure: fig.add_traces(traces) layout_hdrh = layout.get("plot-hdrh-latency", None) if lat_hdrh: - layout_hdrh["title"]["text"] = f"<b>{name}</b>" fig.update_layout(layout_hdrh) return fig diff --git a/resources/tools/dash/app/pal/trending/layout.py b/resources/tools/dash/app/pal/trending/layout.py index c12d64a213..dd097b449f 100644 --- a/resources/tools/dash/app/pal/trending/layout.py +++ b/resources/tools/dash/app/pal/trending/layout.py @@ -910,11 +910,20 @@ class Layout: txt = lat_data["points"][0]["text"].replace("<br>", "\n") hdrh_data = lat_data["points"][0].get("customdata", None) if hdrh_data: - graph = [dcc.Graph( - id="hdrh-latency-graph", - figure=graph_hdrh_latency(hdrh_data, self.layout) - ), ] - + graph = [dbc.Card( + class_name="g-0", + children=[ + dbc.CardHeader(hdrh_data.pop("name")), + dbc.CardBody(children=[ + dcc.Graph( + id="hdrh-latency-graph", + figure=graph_hdrh_latency( + hdrh_data, self.layout + ) + ) + ]) + ]) + ] metadata = [ dbc.Card( class_name="g-0", diff --git a/resources/tools/dash/app/pal/trending/layout.yaml b/resources/tools/dash/app/pal/trending/layout.yaml index 9645b744c0..0c0b62d591 100644 --- a/resources/tools/dash/app/pal/trending/layout.yaml +++ b/resources/tools/dash/app/pal/trending/layout.yaml @@ -155,10 +155,10 @@ plot-trending-lat: namelength: -1 plot-hdrh-latency: - title: - text: "Latency by Percentile Distribution" - xanchor: "center" - x: 0.5 + # title: + # text: "Latency by Percentile Distribution" + # xanchor: "center" + # x: 0.5 # font: # size: 10 showlegend: True @@ -192,7 +192,7 @@ plot-hdrh-latency: # tickfont: # size: 14 yaxis: - title: "One-Way Latency per Direction [uSec]" + title: "One-Way Latency per Direction [us]" # titlefont: # size: 14 gridcolor: "rgb(230, 230, 230)" |