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

Cases/Hospitalizations chart bar stacking bug #677

Open
majazaloznik opened this issue Nov 6, 2020 · 1 comment
Open

Cases/Hospitalizations chart bar stacking bug #677

majazaloznik opened this issue Nov 6, 2020 · 1 comment
Labels
bug Something isn't working priority-1

Comments

@majazaloznik
Copy link
Member

When removing variables from view that are subsets of visible variables, they are subtracted from the bar height, which they shouldn't be.

Minimal example: removing patients on ventilator from patients in ICU results in bar heights for "patients in ICU that are not on venitlator" instead of all patients in ICU.

Screenshot_2020-11-06_16-37-57

Screenshot_2020-11-06_16-38-38

@majazaloznik majazaloznik added bug Something isn't working priority-1 labels Nov 6, 2020
@lukarenko lukarenko changed the title Hospitalizations chart bar stacking bug Cases/Hospitalizations chart bar stacking bug Nov 7, 2020
@lukarenko
Copy link
Contributor

I think the right solution would be to track enable/disable events on legend items, like this:
https://stackoverflow.com/questions/29833018/check-if-all-legend-items-are-selected-in-highcharts

That way, we would know which items are shown and we need to subtract only those from "supersets":
https://github.com/sledilnik/website/blob/master/src/visualizations/PatientsChart.fs#L240

But since this would require chart.data change, I am not sure what is the best way to do it. Here is example how they change chart properties and they trigger chart.redraw afterwards:
https://stackoverflow.com/questions/16073403/highcharts-how-to-programmatically-toggle-legend-items-and-determine-which-ite

But this requires proper developer like @joahim or @breki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-1
Projects
None yet
Development

No branches or pull requests

2 participants