Skip to content

Commit

Permalink
[DisplayedElements] properly handle line shape
Browse files Browse the repository at this point in the history
  • Loading branch information
techfreaque committed Feb 16, 2023
1 parent c4f4912 commit 05b771c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Meta/Keywords/scripting_library/UI/plots/displayed_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@ def _plot_graphs(self, graphs_by_parts):
size = None
if dataset[0].get("shape", None) is None:
shape = None
line_shape = dataset[0].get("line_shape", None)
mode=dataset[0].get("mode", None)
own_yaxis = dataset[0].get("own_yaxis", False)
kind = dataset[0].get("kind", None)
for data in dataset:
if x is not None:
x.append(data["x"])
Expand Down Expand Up @@ -188,7 +191,7 @@ def _plot_graphs(self, graphs_by_parts):
y_type = "log"

part.plot(
kind=data.get("kind", None),
kind=kind,
x=x,
y=y,
open=open,
Expand All @@ -200,7 +203,8 @@ def _plot_graphs(self, graphs_by_parts):
text=text,
x_type="date",
y_type=y_type,
mode=data.get("mode", None),
line_shape=line_shape,
mode=mode,
own_yaxis=own_yaxis,
color=color,
size=size,
Expand Down Expand Up @@ -266,6 +270,7 @@ async def _get_cached_values_to_display(self, cached_value_metadata, x_shift, st
cache_displayed_value = plotted_displayed_value = cached_value_metadata["cache_value"]
kind = cached_value_metadata["kind"]
mode = cached_value_metadata["mode"]
line_shape = cached_value_metadata["line_shape"]
own_yaxis = cached_value_metadata["own_yaxis"]
condition = cached_value_metadata.get("condition", None)
try:
Expand Down Expand Up @@ -301,6 +306,7 @@ async def _get_cached_values_to_display(self, cached_value_metadata, x_shift, st
"kind": kind,
"mode": mode,
"own_yaxis": own_yaxis,
"line_shape": line_shape,
})
else:
plotted_values.append({
Expand All @@ -309,6 +315,7 @@ async def _get_cached_values_to_display(self, cached_value_metadata, x_shift, st
"kind": kind,
"mode": mode,
"own_yaxis": own_yaxis,
"line_shape": line_shape,
})
except KeyError:
pass
Expand Down

0 comments on commit 05b771c

Please sign in to comment.