From 1c8165057202c5940c01e6d96742ece14db0ccfd Mon Sep 17 00:00:00 2001 From: Guillaume Lajarige Date: Mon, 10 Oct 2016 13:14:13 +0000 Subject: [PATCH] Graph : - Bar chart labels on x axis are now displayed vertically like in iTop 2.2. Also, when there are more than 24 labels, not all of them are displayed in order to keep the axis readable. - Pie chart legend is now placed on the right side. SVN:trunk[4453] --- application/displayblock.class.inc.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/application/displayblock.class.inc.php b/application/displayblock.class.inc.php index a9a556ff8..ef876a1cb 100644 --- a/application/displayblock.class.inc.php +++ b/application/displayblock.class.inc.php @@ -1015,6 +1015,12 @@ var chart = c3.generate({ }, axis: { x: { + tick: { + culling: {max: 25}, // Maximum 24 labels on x axis (2 years). + centered: true, + rotate: 90, + multiline: false + }, type: 'category' // this needed to load string x value } }, @@ -1066,6 +1072,7 @@ var chart = c3.generate({ }, legend: { show: true, + position: 'right', }, tooltip: { format: {