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

Multiple views per chart and view switchers in action bar #105

Merged
merged 6 commits into from
Jan 31, 2018

Conversation

pluehne
Copy link
Contributor

@pluehne pluehne commented Jan 31, 2018

This implements support for multiple detail views per chart (which can be configured through the data-config attribute in HTML) along with a handy view switcher in the action bar. Each view has its own configuration. For instance, there can be one view showing the daily data recorded in the last two months, while another view shows the weekly aggregated data over the last two years.

This pull requests exemplarily adds support for the view switcher to the pull requests (total) chart, while compatibility with the older configuration format is ensured.

I recommend reviewing this pull request commit by commit.

See the screenshots below to see how this looks in action 🙂.

screenshot from 2018-01-31 16-26-08

screenshot from 2018-01-31 16-26-03

screenshot from 2018-01-31 16-26-13

This adds CSS support for button bars, which contain multiple buttons
attached to each other.
This extracts the sorting routine from the aggregation method and
applies it to all time data and not just when aggregation is enabled,
which was the case before.
This commit implements the new option “views.” With this array, multiple
views can be specified, which each have a unique configuration. For
instance, one view could show the daily data of the last two months and
another one weekly aggregated data for the last two years.

The implementation ensures that former configurations that don’t make
use of views still work as before.
With this change, all history charts that provide multiple views in their
configurations automatically get a view switcher in the corresponding
action bar next to the chart.

This places the view switcher on the left side of the action bar, while
the data download button is moved to the right side.
This adds three views (last two months, last two years, all data) to the
“pull requests (total)” chart, for which a view switcher is
automatically created.
To demonstrate the new view switcher, more demo data is needed to show
meaningful differences between the views.
@pluehne
Copy link
Contributor Author

pluehne commented Jan 31, 2018

@larsxschneider: I just noticed that our reports truncate data after two years. Hence, the all view doesn’t really make sense, as it will show the same data as the two years view.

I’d suggest that we stop truncating data after 2 years, as we now have the option to show this period via the view switcher 😄.

However, that’s something we should address in another pull request.

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

Successfully merging this pull request may close these issues.

2 participants