Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2949 Lượt xem

I read from cybrosys that we can either use the cdnjs link as an src attribute in the script tag or pull chart.js from git and add it to manifest. I registered cdnjs link to templates and it appears inside head tag, however it doesn't update my charts. Maybe that is because of another link below which calls built-in old chartjs. What about the second option, I don't know how to add chart.js to manifest. (as external dependency? if yes, how?)

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

You can add the latest cdn link for the chart.js library in the assets path, So it will update the library as it updates.


Here is an example showing adding the cdnlink in manifest:


ie:


'assets': {

        'web.assets_backend': [ "https://cdn.jsdelivr.net/npm/chart.js"] }

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 9 22
2469
4
thg 5 21
29040
2
thg 11 23
9027
0
thg 7 20
3131
1
thg 6 23
2531