Break out legend into a separate HTML element and adjust chart widths #15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this change I have rewritten the legend code so that the legend is a separate div which we can style directly. Previously the legend was part of the chart canvas so we could to control it directly. The legend is now floated on top of the chart, with each legend entry in a neat vertical list.
I have also changed the responsive styles used to determine how many charts are displayed in a row. This is very easy to change, but currently I have it so that
Displays wider than 1500px: 4 charts/row
Displays wider than 1160px up to 1499: 3 charts/row
Displays wider than 450px up to 1159: 2 charts/row
Displays narrower than 449px: 1 chart/row
The transitions are defined at the bottom of
StatsChart.vue
. Inevitably close to the transition points the chart may be wider or narrower than is ideal: this is a matter of judgement.Screenshots:
1500px browser width
1160px browser width
450px browser width
400px browser width
px browser**