Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DisplayedElements] properly handle line shape #805

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ def _plot_graphs(self, graphs_by_parts):
size = None
if dataset[0].get(commons_enums.PlotAttributes.SHAPE.value, None) is None:
shape = None
line_shape = dataset[0].get("line_shape", None)
own_yaxis = dataset[0].get(commons_enums.PlotAttributes.OWN_YAXIS.value, False)
for data in dataset:
if x is not None:
Expand Down Expand Up @@ -209,6 +210,7 @@ def _plot_graphs(self, graphs_by_parts):
text=text,
x_type="date",
y_type=y_type,
line_shape=line_shape,
mode=data.get(commons_enums.PlotAttributes.MODE.value, None),
own_yaxis=own_yaxis,
color=color,
Expand Down Expand Up @@ -276,6 +278,7 @@ async def _get_cached_values_to_display(self, cached_value_metadata, x_shift, st
kind = cached_value_metadata[commons_enums.PlotAttributes.KIND.value]
mode = cached_value_metadata[commons_enums.PlotAttributes.MODE.value]
own_yaxis = cached_value_metadata[commons_enums.PlotAttributes.OWN_YAXIS.value]
line_shape = cached_value_metadata["line_shape"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this requires the plot keyword to set "line_shape"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thats already added
image

condition = cached_value_metadata.get("condition", None)
try:
cache_database = databases.CacheDatabase(cache_file)
Expand Down Expand Up @@ -310,6 +313,7 @@ async def _get_cached_values_to_display(self, cached_value_metadata, x_shift, st
commons_enums.PlotAttributes.KIND.value: kind,
commons_enums.PlotAttributes.MODE.value: mode,
commons_enums.PlotAttributes.OWN_YAXIS.value: own_yaxis,
"line_shape": line_shape,
})
else:
plotted_values.append({
Expand All @@ -318,6 +322,7 @@ async def _get_cached_values_to_display(self, cached_value_metadata, x_shift, st
commons_enums.PlotAttributes.KIND.value: kind,
commons_enums.PlotAttributes.MODE.value: mode,
commons_enums.PlotAttributes.OWN_YAXIS.value: own_yaxis,
"line_shape": line_shape,
})
except KeyError:
pass
Expand Down