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

Add workaround for ChartJS shrinking chart bug #456

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add workaround for ChartJS shrinking chart bug
ChartJS has a bug causing charts to continually shrink and reset size when the browser
zoom level is not 100%. See chartjs/Chart.js#10890 for details.
cblanken committed Aug 2, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit 820d01edcee60710bb0ccd3bc3028fc80fde02f1
3 changes: 2 additions & 1 deletion lute/templates/stats/index.html
Original file line number Diff line number Diff line change
@@ -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>

@@ -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.