From 366e51e9abb06c1069eaa0b4633081f86812f391 Mon Sep 17 00:00:00 2001 From: Arman KYOKCHAN Date: Thu, 24 Oct 2013 05:26:07 +0000 Subject: [PATCH] issue #0001757: Graphic line bug fixed --- library/Giant/Partials.php | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/library/Giant/Partials.php b/library/Giant/Partials.php index 0353b30da..dc3969013 100644 --- a/library/Giant/Partials.php +++ b/library/Giant/Partials.php @@ -11,7 +11,7 @@ Class AvisDeCredit 'Conan & Holder' => array('min' => -4.5, 'max' => 16), 'Afdcc2' => array('min' => 0, 'max' => 5), 'Score Z' => array('min' => -3, 'max' => 3), - 'CommonRisk' => array('min' => 0, 'max' => 20), + 'CommonRisk' => array('min' => 1, 'max' => 5), 'ERC' => array('min' => -5, 'max' => 5) ); private $pdRating = array('AAA' => 9, 'AA' => 8, 'A' =>7, 'BBB' => 6, 'BB' => 5, 'B' => 4, 'CCC' => 3, 'CC' => 2, 'C' => 1, 'D' => 0); @@ -68,9 +68,9 @@ Class AvisDeCredit $current = (($current > $max)?$max:$current); $current = (($current < $min)?$min:$current); $m->setScale($min, $max); - $m->addZone(9, 100, 0x21FF11, ""); - $m->addZone(5, 9, 0xFF8C19, ""); - $m->addZone(0, 5, 0xFF0004, ""); + $m->addZone(55, 100, 0x21FF11, ""); + $m->addZone(35, 55, 0xFF8C19, ""); + $m->addZone(0, 35, 0xFF0004, ""); break; case 'Conan_&_Holder': $current = (($current > $max)?$max:$current); @@ -94,12 +94,18 @@ Class AvisDeCredit $m->addZone(-3, 0, 0xFF0004, ""); break; case 'CommonRisk': - $current = (($current > $max)?$max:$current); - $current = (($current < $min)?$min:$current); - $m->setScale($min, $max); - $m->addZone(8, 20, 0x21FF11, ""); - $m->addZone(5, 8, 0xFF8C19, ""); - $m->addZone(0, 5, 0xFF0004, ""); + if ($current!=8 && $current!=9) { + $current = (($current < $min)?$min:$current); + $current = (($current > $max)?$max:$current); + $m->setScale($min, $max); + $m->addZone(3, 5, 0x21FF11, ""); + $m->addZone(2, 3, 0xFF8C19, ""); + $m->addZone(0, 2, 0xFF0004, ""); + } + else{ + $m->setScale($min, $max); + $m->addZone(0, 5, 0xCCCCCC, ""); + } break; case 'ERC': $current = (($current > $max)?$max:$current);