diff --git a/libraries/chart.lib.php b/libraries/chart.lib.php index 282387078..94cccf581 100644 --- a/libraries/chart.lib.php +++ b/libraries/chart.lib.php @@ -93,6 +93,11 @@ function PMA_chart_results($data, &$chartSettings, &$chartErrors = array()) $chartSettings['continuous'] = 'off'; } + // set default font size if needed + if (empty($chartSettings['fontSize'])) { + $chartSettings['fontSize'] = 8; + } + // default for legend $chartSettings['legend'] = false; diff --git a/libraries/chart/pma_pchart_chart.php b/libraries/chart/pma_pchart_chart.php index 4a70fc212..47b0c02b5 100644 --- a/libraries/chart/pma_pchart_chart.php +++ b/libraries/chart/pma_pchart_chart.php @@ -59,7 +59,7 @@ abstract class PMA_pChart_Chart extends PMA_Chart ); } - $this->chart->setFontProperties($this->getFontPath().'tahoma.ttf', 8); + $this->chart->setFontProperties($this->getFontPath().'tahoma.ttf', $this->getFontSize()); $this->chart->setImageMap(true, 'mapid'); } @@ -202,6 +202,11 @@ abstract class PMA_pChart_Chart extends PMA_Chart return $this->settings['scale']; } + protected function getFontSize() + { + return $this->settings['fontSize']; + } + protected function isContinuous() { return $this->settings['continuous'] == 'on'; diff --git a/tbl_chart.php b/tbl_chart.php index a794c4b9a..ef2ff1d3e 100644 --- a/tbl_chart.php +++ b/tbl_chart.php @@ -153,11 +153,15 @@ $url_params['reload'] = 1;