v1.18.x
Anil Mandepudi committed by Julian Lam
parent 9856cf282a
commit c44c689ebf

@ -29,7 +29,7 @@ define('admin/advanced/errors', ['Chart'], function(Chart) {
dailyLabels = dailyLabels.slice(-7); dailyLabels = dailyLabels.slice(-7);
if (utils.isMobile()) { if (utils.isMobile()) {
Chart.defaults.global.showTooltips = false; Chart.defaults.global.tooltips.enabled = false;
} }
var data = { var data = {
@ -38,12 +38,12 @@ define('admin/advanced/errors', ['Chart'], function(Chart) {
datasets: [ datasets: [
{ {
label: "", label: "",
fillColor: "rgba(186,139,175,0.2)", backgroundColor: "rgba(186,139,175,0.2)",
strokeColor: "rgba(186,139,175,1)", borderColor: "rgba(186,139,175,1)",
pointColor: "rgba(186,139,175,1)", pointBackgroundColor: "rgba(186,139,175,1)",
pointStrokeColor: "#fff", pointHoverBackgroundColor: "#fff",
pointHighlightFill: "#fff", pointBorderColor: "#fff",
pointHighlightStroke: "rgba(186,139,175,1)", pointHoverBorderColor: "rgba(186,139,175,1)",
data: ajaxify.data.analytics['not-found'] data: ajaxify.data.analytics['not-found']
} }
] ]
@ -53,12 +53,12 @@ define('admin/advanced/errors', ['Chart'], function(Chart) {
datasets: [ datasets: [
{ {
label: "", label: "",
fillColor: "rgba(151,187,205,0.2)", backgroundColor: "rgba(151,187,205,0.2)",
strokeColor: "rgba(151,187,205,1)", borderColor: "rgba(151,187,205,1)",
pointColor: "rgba(151,187,205,1)", pointBackgroundColor: "rgba(151,187,205,1)",
pointStrokeColor: "#fff", pointHoverBackgroundColor: "#fff",
pointHighlightFill: "#fff", pointBorderColor: "#fff",
pointHighlightStroke: "rgba(151,187,205,1)", pointHoverBorderColor: "rgba(151,187,205,1)",
data: ajaxify.data.analytics['toobusy'] data: ajaxify.data.analytics['toobusy']
} }
] ]
@ -67,13 +67,41 @@ define('admin/advanced/errors', ['Chart'], function(Chart) {
notFoundCanvas.width = $(notFoundCanvas).parent().width(); notFoundCanvas.width = $(notFoundCanvas).parent().width();
tooBusyCanvas.width = $(tooBusyCanvas).parent().width(); tooBusyCanvas.width = $(tooBusyCanvas).parent().width();
new Chart(notFoundCanvas.getContext('2d')).Line(data['not-found'], {
responsive: true, new Chart(notFoundCanvas.getContext('2d'), {
animation: false type: 'line',
data: data['not-found'],
options: {
responsive: true,
legend: {
display: false
},
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
}
}
}); });
new Chart(tooBusyCanvas.getContext('2d')).Line(data['toobusy'], {
responsive: true, new Chart(tooBusyCanvas.getContext('2d'), {
animation: false type: 'line',
data: data['toobusy'],
options: {
responsive: true,
legend: {
display: false
},
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
}
}
}); });
}; };

@ -165,8 +165,7 @@ define('admin/general/dashboard', ['semver', 'Chart'], function(semver, Chart) {
trafficLabels = utils.getHoursArray(); trafficLabels = utils.getHoursArray();
if (isMobile) { if (isMobile) {
Chart.defaults.global.showTooltips = false; Chart.defaults.global.tooltips.enabled = false;
Chart.defaults.global.animation = false;
} }
var data = { var data = {

Loading…
Cancel
Save