-
Notifications
You must be signed in to change notification settings - Fork 530
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
Upgraded Chart.js to version 4.4.2 #3233
Changes from 6 commits
ffeef9f
35a348c
e940f2d
5309640
e90421c
f4eeb50
5a56023
0932ef6
ceda07e
5bdec21
11c7506
3eda4ce
3b599c4
291e68f
e30ae90
5c62ae6
60b514a
5aa5780
43d8f17
ba5081a
483d471
ab0f3f9
4df1662
811a555
3ee556b
ddbf226
3729a90
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,39 +107,35 @@ var Pontoon = (function (my) { | |
}, | ||
}, | ||
scales: { | ||
xAxes: [ | ||
{ | ||
type: 'time', | ||
time: { | ||
displayFormats: { | ||
month: 'MMM', | ||
}, | ||
tooltipFormat: 'MMMM YYYY', | ||
}, | ||
gridLines: { | ||
display: false, | ||
}, | ||
offset: true, | ||
ticks: { | ||
source: 'data', | ||
x: { | ||
type: 'time', | ||
time: { | ||
displayFormats: { | ||
month: 'MMM', | ||
}, | ||
tooltipFormat: 'MMMM YYYY', | ||
}, | ||
], | ||
yAxes: [ | ||
{ | ||
gridLines: { | ||
display: false, | ||
}, | ||
position: 'right', | ||
ticks: { | ||
beginAtZero: true, | ||
maxTicksLimit: 3, | ||
max: 100, | ||
precision: 0, | ||
callback: (value) => nf.format(value / 100), | ||
}, | ||
grid: { | ||
display: false, | ||
}, | ||
offset: true, | ||
ticks: { | ||
source: 'data', | ||
}, | ||
], | ||
}, | ||
y: { | ||
grid: { | ||
display: false, | ||
}, | ||
ticks: { | ||
beginAtZero: true, | ||
maxTicksLimit: 3, | ||
precision: 2, | ||
callback: (value) => nf.format(value), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why the change in the There are a few things that don't work as expected in the new Profile chart:
|
||
}, | ||
position: 'right', | ||
max: 100, | ||
}, | ||
}, | ||
}, | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will load all these libs on most of the views, even when they aren't needed.
We should load them, like other static files, through Django pipeline in settings, and only in the views where Chart.js was previously used.
Also, seems like
pontoon/base/static/js/lib/chart.umd.js.map
is not used?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, I was getting a console error when I didn't include this file through base.html, but now that I've shifted over to local imports it seems this file isn't necessary.