From 2e421895edf8cb8557ec2c12158c96a8e2ab6d73 Mon Sep 17 00:00:00 2001 From: Martynas Mickevicius Date: Wed, 7 Jul 2010 16:57:06 +0300 Subject: [PATCH] using background color setting now --- libraries/chart/pma_chart.php | 8 ++++++-- libraries/chart/pma_pchart_chart.php | 10 +++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/libraries/chart/pma_chart.php b/libraries/chart/pma_chart.php index 357dafa4a..d31f97f33 100644 --- a/libraries/chart/pma_chart.php +++ b/libraries/chart/pma_chart.php @@ -1,5 +1,9 @@ '#E5E5E5', + 'bgColor' => '#84AD83', /* * The width of the chart. @@ -103,7 +107,7 @@ class PMA_Chart return $this->settings['height']; } - function getBgColorComp($component) + function getBgColor($component) { return hexdec(substr($this->settings['bgColor'], ($component * 2) + 1, 2)); } diff --git a/libraries/chart/pma_pchart_chart.php b/libraries/chart/pma_pchart_chart.php index dce0faf74..10c19c8dc 100644 --- a/libraries/chart/pma_pchart_chart.php +++ b/libraries/chart/pma_pchart_chart.php @@ -7,8 +7,8 @@ define('LEFT', 3); require_once 'pma_chart.php'; -include "pChart/pData.class"; -include "pChart/pChart.class"; +require_once 'pChart/pData.class'; +require_once 'pChart/pChart.class'; /* * Base class for every chart implemented using pChart. @@ -75,7 +75,11 @@ abstract class PMA_pChart_Chart extends PMA_Chart protected function drawCommon() { $this->chart->setFontProperties($this->getFontPath().'tahoma.ttf', 8); - $this->chart->drawGraphAreaGradient(132,173,131,50,TARGET_BACKGROUND); + $this->chart->drawGraphAreaGradient( + $this->getBgColor(RED), + $this->getBgColor(GREEN), + $this->getBgColor(BLUE), + 50,TARGET_BACKGROUND); $this->chart->addBorder(2); }