using background color setting now
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
define('RED', 0);
|
||||||
|
define('GREEN', 1);
|
||||||
|
define('BLUE', 2);
|
||||||
|
|
||||||
class PMA_Chart
|
class PMA_Chart
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@@ -39,7 +43,7 @@ class PMA_Chart
|
|||||||
/*
|
/*
|
||||||
* Chart background color.
|
* Chart background color.
|
||||||
*/
|
*/
|
||||||
'bgColor' => '#E5E5E5',
|
'bgColor' => '#84AD83',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The width of the chart.
|
* The width of the chart.
|
||||||
@@ -103,7 +107,7 @@ class PMA_Chart
|
|||||||
return $this->settings['height'];
|
return $this->settings['height'];
|
||||||
}
|
}
|
||||||
|
|
||||||
function getBgColorComp($component)
|
function getBgColor($component)
|
||||||
{
|
{
|
||||||
return hexdec(substr($this->settings['bgColor'], ($component * 2) + 1, 2));
|
return hexdec(substr($this->settings['bgColor'], ($component * 2) + 1, 2));
|
||||||
}
|
}
|
||||||
|
@@ -7,8 +7,8 @@ define('LEFT', 3);
|
|||||||
|
|
||||||
require_once 'pma_chart.php';
|
require_once 'pma_chart.php';
|
||||||
|
|
||||||
include "pChart/pData.class";
|
require_once 'pChart/pData.class';
|
||||||
include "pChart/pChart.class";
|
require_once 'pChart/pChart.class';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Base class for every chart implemented using pChart.
|
* Base class for every chart implemented using pChart.
|
||||||
@@ -75,7 +75,11 @@ abstract class PMA_pChart_Chart extends PMA_Chart
|
|||||||
protected function drawCommon()
|
protected function drawCommon()
|
||||||
{
|
{
|
||||||
$this->chart->setFontProperties($this->getFontPath().'tahoma.ttf', 8);
|
$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);
|
$this->chart->addBorder(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user