From 77806412faa242535f0ece5ccf2dc11cc6bd8925 Mon Sep 17 00:00:00 2001 From: FrancescoUK Date: Sun, 13 Nov 2016 17:43:59 +0000 Subject: [PATCH] Fix line chart axis labels overlap issue --- application/views/reports/graphs/line.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/application/views/reports/graphs/line.php b/application/views/reports/graphs/line.php index 9c39d52a0..9d389f0a6 100644 --- a/application/views/reports/graphs/line.php +++ b/application/views/reports/graphs/line.php @@ -33,13 +33,23 @@ axisX: { // Lets offset the chart a bit from the labels offset: 120, - position: 'end' + position: 'end', + // offset the labels a bit from the axis to avoid overlaps + labelOffset: { + x: 0, + y: 20 + } }, // Y-Axis specific configuration axisY: { // Lets offset the chart a bit from the labels - offset: 60, + offset: 80, + // offset the labels a bit from the axis to avoid overlaps + labelOffset: { + x: -20, + y: 0 + }, // The label interpolation function enables you to modify the values // used for the labels on each axis. labelInterpolationFnc: function(value) {