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

Chart titles do not display filter values correctly #196

Open
phuongdoan13 opened this issue May 11, 2023 · 3 comments
Open

Chart titles do not display filter values correctly #196

phuongdoan13 opened this issue May 11, 2023 · 3 comments

Comments

@phuongdoan13
Copy link
Contributor

phuongdoan13 commented May 11, 2023

This is an existing issues on all the chart with dynamic title with fitlers. The titles are not displaying the filtered values correctly. Consider these cases:

1. No filter on hour-range:

image

=> Title should be "... between 0:00 and 24:00"


2.Month-range and Hour-range with one point at either extreme end (Jan/Dec, 0/24). Invert is checked.

image

=> The Month-Range is [1, 9], inverted should be "... between the months of Oct and Dec"

=> Similarly, Hour-Range is [6, 24], inverted should be "... between the hours of 00:00 and 05:00"


3.Month-range and hour-range with no point at any extreme end. Invert is checked.

image

=> The Month-Range is [3, 10], inverted should be "... between the months of Nov and Feb"

=> Similarly, Hour-Range is [3, 21], inverted should be "... between the hours of 22:00 and 02:00"

Probable cause

clima/my_project/utils.py

Lines 321 to 329 in f116b41

def determine_month_and_hour_filter(month, hour, invert_month, invert_hour):
start_month, end_month = month
if invert_month == ["invert"] and (start_month != 1 or end_month != 12):
end_month, start_month = month
start_hour, end_hour = hour
if invert_hour == ["invert"] and (start_hour != 0 or end_hour != 24):
end_hour, start_hour = hour
return start_month, end_month, start_hour, end_hour

@FedericoTartarini
Copy link
Contributor

I think I have fixed the first sub-issue now the message is showing the right value, from 0 to 24.

I am not sure about point 2. If the user selects invert it should say which data are included in the analysis not the ones that are excluded. Could you please elaborate a bit more on this?

Could you please also elaborate more on point 3? I think that the two screenshot you took do not match.

@phuongdoan13
Copy link
Contributor Author

Hi Federico, thanks for your question. I just upated the description above

@FedericoTartarini
Copy link
Contributor

Hi, @phuongdoan13 could you please check if point one is solved? If so could you please remove it from the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants