mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 22:45:46 +01:00
disabling graph animation on mobile devices
This commit is contained in:
@@ -158,6 +158,7 @@ define('admin/general/dashboard', ['semver'], function(semver) {
|
|||||||
|
|
||||||
if (isMobile) {
|
if (isMobile) {
|
||||||
Chart.defaults.global.showTooltips = false;
|
Chart.defaults.global.showTooltips = false;
|
||||||
|
Chart.defaults.global.animation = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var data = {
|
var data = {
|
||||||
@@ -186,7 +187,7 @@ define('admin/general/dashboard', ['semver'], function(semver) {
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
trafficCanvas.width = $(trafficCanvas).parent().width(); // is this necessary
|
trafficCanvas.width = $(trafficCanvas).parent().width();
|
||||||
graphs.traffic = new Chart(trafficCtx).Line(data, {
|
graphs.traffic = new Chart(trafficCtx).Line(data, {
|
||||||
responsive: true
|
responsive: true
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user