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

unsetting filters in the barcharts creates empty data #172

Open
stvno opened this issue Dec 15, 2017 · 1 comment
Open

unsetting filters in the barcharts creates empty data #172

stvno opened this issue Dec 15, 2017 · 1 comment

Comments

@stvno
Copy link
Contributor

stvno commented Dec 15, 2017

After setting a day and/or hour filter by dragging a box on the respective barchart:
image

and unselecting again by clicking outside the selection box on the barchart, the other barchart becomes empty:
image

and the map becomes grey:
image

The problem seems to be that the URL-parameter for the respective filter is set wrong: &df=7%2F7&hf=0%2F24 that is dayfilter 7-7 instead of 0-7 or removed altogether

@stvno
Copy link
Contributor Author

stvno commented Dec 15, 2017

Diving a bit more in the code it became apparent that DC is to blame: it produces an extent of 0 length: eg [7,7]

Possible fixes:

  • create a clearHourFilter and a clearDayFilter in src/store/actions/date.js to be called when the extent is 0 long
  • check for 0-length filters in src/store/actions/date.js and change those to 0-7 & 0-24 filters
  • check for 0-length filters in the onExtentChange function in `src/components/Sidebar/TimeFilters/index.js' and change those 0-7 & 0-24

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

1 participant