Report: NFV Graphs 11/19411/1
authorTibor Frank <tifrank@cisco.com>
Tue, 7 May 2019 12:55:19 +0000 (14:55 +0200)
committerTibor Frank <tifrank@cisco.com>
Tue, 7 May 2019 12:55:19 +0000 (14:55 +0200)
Change-Id: I62a6e2f337d198cd2c4da7ba0bd1b1b9752310ad
Signed-off-by: Tibor Frank <tifrank@cisco.com>
resources/tools/presentation/generator_plots.py

index cc9a774..5f2de94 100644 (file)
@@ -1528,13 +1528,25 @@ def plot_service_density_heatmap_compare(plot, input_data):
                 showarrow=False
             )
 
-            point["text"] = "" if data_r[c][n] is None else str(data_r[c][n])
+            try:
+                data_point = str(data_r[c][n])
+            except KeyError:
+                data_point = None
+            point["text"] = "" if data_point is None else data_point
             annotations_r.append(deepcopy(point))
 
-            point["text"] = "" if data_c[c][n] is None else str(data_c[c][n])
+            try:
+                data_point = str(data_c[c][n])
+            except KeyError:
+                data_point = None
+            point["text"] = "" if data_point is None else data_point
             annotations_c.append(deepcopy(point))
 
-            point["text"] = "" if diff[c][n] is None else str(diff[c][n])
+            try:
+                data_point = str(diff[c][n])
+            except KeyError:
+                data_point = None
+            point["text"] = "" if data_point is None else data_point
             annotations_diff.append(deepcopy(point))
 
             hover_line.append(text.format(

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.