Skip to content

Commit

Permalink
Merge pull request #456 from cblanken/issue-293-shrinking-stats-chart
Browse files Browse the repository at this point in the history
Add workaround for ChartJS shrinking chart bug
  • Loading branch information
jzohrab authored Aug 6, 2024
2 parents 2b2911e + 820d01e commit 350b5ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lute/templates/stats/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h2>Words read</h2>
</ul>
</table>

<div style="width:60%;">
<div style="position: relative; aspect-ratio: 3">
<canvas id="wordCountChart"></canvas>
</div>

Expand Down Expand Up @@ -86,6 +86,7 @@ <h2>Words read</h2>
datasets: datasets
},
options: {
maintainAspectRatio: false,
scales: {
// Unable to get the "time" scale working correctly,
// so now the data just has all of the dates.
Expand Down

0 comments on commit 350b5ec

Please sign in to comment.