Skip to content

Commit

Permalink
Constrain Plot-based progress chart to a 16:9 ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
dispatchrabbi committed Jul 12, 2024
1 parent e374e79 commit a4b6c22
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Types of changes include:
## Upcoming/Unreleased

- FIXED: In cases where multiple progress entries were made in a single day, the graph on leaderboards would only show the first entry. The graph now shows the correct total. (h/t Athena)
- FIXED: The leaderboard chart no longer overflows into the standings on mobile. (h/t cenlyra)

## 0.11.5

Expand Down
5 changes: 2 additions & 3 deletions src/components/chart/PlotProgressChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ onMounted(() => {
fontFamily: 'Jost, sans-serif',
fontSize: '0.75rem',
},
// the plot should be a 16:9 aspect ratio
width: plotContainerWidth.value,
height: (plotContainerWidth.value * 9) / 16,
color: {
type: 'categorical',
range: colorScheme.value.cycle,
Expand Down Expand Up @@ -164,9 +166,6 @@ onMounted(() => {
position: relative;
margin: auto;
/* this is all to keep the chart nicely-sized for desktop and mobile
fullscreen is another ball of wax */
aspect-ratio: calc(16 / 9);
min-height: 12rem;
max-height: calc(100vh - 4rem);
max-width: 100%;
Expand Down
4 changes: 2 additions & 2 deletions src/components/pages/boards/BoardDetailPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ onMounted(() => {
:header="toTitleCase(TALLY_MEASURE_INFO[measure].label.plural)"
>
<!-- line chart -->
<div class="w-full">
<div class="w-full mb-4">
<BoardProgressChart
:board="board"
:participants="board.participants"
Expand All @@ -244,7 +244,7 @@ onMounted(() => {
<!-- fundraiser meter -->
<div
v-if="board.fundraiserMode"
class="w-full mt-8"
class="w-full"
>
<BoardProgressMeter
:board="board"
Expand Down

0 comments on commit a4b6c22

Please sign in to comment.