Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit 00d5d51

Browse files
committed
chore(deps): update chartjs to 3.5.1
1 parent 7645591 commit 00d5d51

File tree

4 files changed

+29
-17
lines changed

4 files changed

+29
-17
lines changed

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"require": {
2626
"simplesamlphp/simplesamlphp": "~1.17",
2727
"simplesamlphp/composer-module-installer": "~1.0",
28-
"cesnet/simplesamlphp-module-chartjs": "~2.8.0",
2928
"symfony/var-exporter": "^5.0",
3029
"phpseclib/phpseclib": "~3.0",
3130
"ext-curl": "*",

templates/listOfSps-tpl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,6 @@
150150

151151
?>
152152

153-
<script src="<?php echo htmlspecialchars(Module::getModuleURL('chartjs/Chart.bundle.min.js')); ?>"></script>
153+
<script src="<?php echo htmlspecialchars(Module::getModuleURL('perun/res/js/chart.min.js')); ?>"></script>
154154

155155
<script src="<?php echo htmlspecialchars(Module::getModuleURL('perun/listOfSps.js')); ?>"></script>

www/listOfSps.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ function getDataItem(name) {
66
return JSON.parse(document.getElementById('data').getAttribute('content'))[name];
77
}
88

9-
Chart.platform.disableCSSInjection = true;
10-
11-
var ctx = document.getElementById("myChart").getContext('2d');
9+
var ctx = "myChart";
1210
new Chart(ctx, { // eslint-disable-line no-new
1311
type: 'bar',
1412
data: {
@@ -42,26 +40,28 @@ new Chart(ctx, { // eslint-disable-line no-new
4240
}]
4341
},
4442
options: {
43+
plugins: {
44+
legend: {
45+
display: false
46+
},
47+
tooltip: {
48+
callbacks: {
49+
label: function (tooltipItem) {
50+
return tooltipItem.yLabel;
51+
}
52+
}
53+
}
54+
},
4555
scales: {
46-
yAxes: [{
56+
y: {
57+
beginAtZero: true,
4758
ticks: {
48-
beginAtZero: true,
4959
callback: function (value) {
5060
if (Number.isInteger(value)) {
5161
return value;
5262
}
5363
}
5464
}
55-
}]
56-
},
57-
legend: {
58-
display: false
59-
},
60-
tooltips: {
61-
callbacks: {
62-
label: function (tooltipItem) {
63-
return tooltipItem.yLabel;
64-
}
6565
}
6666
}
6767
}

www/res/js/chart.min.js

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)