diff options
author | Go MAEDA <maeda@farend.jp> | 2022-03-03 14:17:19 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2022-03-03 14:17:19 +0000 |
commit | 4926771a8ae7425c2f9a68c35ff877f480e9f408 (patch) | |
tree | 3e9755a2bf08df64512b037315e49dc833b358b4 /app/views | |
parent | 05714ab18a4a4d4a402923b5abfe4fd633f85299 (diff) | |
download | redmine-4926771a8ae7425c2f9a68c35ff877f480e9f408.tar.gz redmine-4926771a8ae7425c2f9a68c35ff877f480e9f408.zip |
Update Chart.js to 3.7.1 (#36701).
Patch by Maciej Pankanin.
git-svn-id: http://svn.redmine.org/redmine/trunk@21446 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/reports/_details.html.erb | 21 | ||||
-rw-r--r-- | app/views/repositories/stats.html.erb | 29 |
2 files changed, 29 insertions, 21 deletions
diff --git a/app/views/reports/_details.html.erb b/app/views/reports/_details.html.erb index 701591c74..3361117fc 100644 --- a/app/views/reports/_details.html.erb +++ b/app/views/reports/_details.html.erb @@ -41,21 +41,24 @@ chartData.datasets[i].borderWidth = 1; } new Chart($(canvas_id), { - type: 'horizontalBar', + type: 'bar', data: chartData, options: { + indexAxis: 'y', elements: { - rectangle: {borderWidth: 2} + bar: {borderWidth: 2} }, responsive: true, - legend: {position: 'right'}, - title: { - display: true, - text: title + plugins: { + legend: {position: 'right'}, + title: { + display: true, + text: title + } }, scales: { - yAxes: [{ stacked: true }], - xAxes: [{ stacked: true }] + yAxis: {stacked: true}, + xAxis: {stacked: true} } } }); @@ -74,6 +77,6 @@ }); <% end %> <% content_for :header_tags do %> - <%= javascript_include_tag "Chart.bundle.min" %> + <%= javascript_include_tag "chart.min" %> <% end %> <% end %> diff --git a/app/views/repositories/stats.html.erb b/app/views/repositories/stats.html.erb index 2020976e1..5266dc262 100644 --- a/app/views/repositories/stats.html.erb +++ b/app/views/repositories/stats.html.erb @@ -36,13 +36,15 @@ $(document).ready(function(){ data: chartData, options: { elements: { - rectangle: {borderWidth: 2} + bar: {borderWidth: 2} }, responsive: true, - legend: {position: 'right'}, - title: { - display: true, - text: <%= raw l(:label_commits_per_month).to_json %> + plugins: { + legend: {position: 'right'}, + title: { + display: true, + text: <%= raw l(:label_commits_per_month).to_json %> + } } } }); @@ -70,17 +72,20 @@ $(document).ready(function(){ }; new Chart(document.getElementById("commits_per_author").getContext("2d"), { - type: 'horizontalBar', + type: 'bar', data: chartData, options: { + indexAxis: 'y', elements: { - rectangle: {borderWidth: 2} + bar: {borderWidth: 2} }, responsive: true, - legend: {position: 'right'}, - title: { - display: true, - text: <%= raw l(:label_commits_per_author).to_json %> + plugins: { + legend: {position: 'right'}, + title: { + display: true, + text: <%= raw l(:label_commits_per_author).to_json %> + } } } }); @@ -94,5 +99,5 @@ $(document).ready(function(){ <% html_title(l(:label_repository), l(:label_statistics)) -%> <% content_for :header_tags do %> - <%= javascript_include_tag "Chart.bundle.min" %> + <%= javascript_include_tag "chart.min" %> <% end %> |