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

phase 2: bug fixes, frontend unit tests, rework distribution view #3

merged 15 commits into from Oct 13, 2018


None yet
1 participant
Copy link

alfateam123 commented Oct 13, 2018

This batch of changes does not bring a lot of changes to the application. I took some time to fix some stuff before starting to work on new features and data visualization/fusion tasks.
The biggest change here is the distribution view: the scatter chart is now replaced by an horizontal bar chart. I found the scatter chart hard to read and (maybe) wrong too, so I replaced it with a standard visualization that better highlights the usage classes and the time I actually spent on the phone (real data below!)


Backend changes:

  • add index on screenon table

Frontend changes:

  • automatically load data from a week ago to today
  • handle "no data" case in distribution view and daily usage view
  • write tests for client-side data manipulation functions
  • rework distribution view: replace scatter chart with horizontal bar chart to show classes of usage (under 5 seconds, 5-10 seconds, 10-30 seconds, 30 seconds to one minute, 1-5 minutes, over 5 minutes)


  • create a minimal "docs" document

alfateam123 added some commits Sep 3, 2018

fix(range-picker): default shown interval to last week
`<data-loader>` requests last week of data by default,
so we want to show it to the user, as we're not showing this information
before this commit, it would set the whole interval as selected.
fix(screen-on-app): show help message, disable tabs when no data loaded
when received data is an empty list, we show a help message
(to be updated with docs link).
We also hide the content of the tabs, when selected: it keeps
the help message visible, and lets the user understand that
something is wrong and cannot use the application.
fix(data-handling): fix cumulated_time, add tests
the daily usage chart wasn't right.
fix cumulated_time() to also add data points for instants
where the screen is off (on_off=false).
the previous cumulated_time() would cut half of the points,
leading to non-accurate charts.

add tests via `polymer test`
fix(data-handling): add midnight records at end of day, fix cumulated…

* add more tests to fix_data and cumulated_time
* add midnight record at end of day in place of start of day
  (start of day will be added later)
fix(data-handling): add "start/end of day" records
now fix_data adds both end of day and start of day records.
the `end of day` records are not applied at the last day,
and the `start of day` records are not created for the first day
in the data.
fix(distribution-chart): replace scatter chart with bar chart
the scatter chart wasn't easy to read, so I decided to replace
it with a bar chart with 6 categories: <5s, 5-10s, 10-30s, 30-60s,
60-300s, >300s (over 5 minutes).
fix(distribution-chart): fix barchart default value, add no data message
* it seems that px-simple-horizontal-bar-chart sets some data
  by default if chart-data is not overridden.
  fix this by setting chart-data to an empty array
* show an explanation message if no data are selected yet.

@alfateam123 alfateam123 merged commit f7e13d8 into master Oct 13, 2018

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
continuous-integration/travis-ci/push The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.