added font size setting
This commit is contained in:
@@ -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;
|
||||
|
||||
|
@@ -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';
|
||||
|
@@ -153,11 +153,15 @@ $url_params['reload'] = 1;
|
||||
|
||||
<tr><td><label for="continuous"><?php echo __("Continuous image"); ?></label></td>
|
||||
<td>
|
||||
<input type="checkbox" name="chartSettings[continuous]" <?php echo ($chartSettings['continuous'] == 'on' ? 'checked="checked"' : ''); ?>>
|
||||
<input type="checkbox" name="chartSettings[continuous]" id="continuous" <?php echo ($chartSettings['continuous'] == 'on' ? 'checked="checked"' : ''); ?>>
|
||||
<i><?php echo _('(May not work on IE8)'); ?></i>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td><label for="fontSize"><?php echo __("Font size"); ?></label></td>
|
||||
<td><input type="text" name="chartSettings[fontSize]" id="fontSize" value="<?php echo (isset($chartSettings['fontSize']) ? $chartSettings['fontSize'] : ''); ?>" /></td>
|
||||
</tr>
|
||||
|
||||
<?php if ($chartSettings['type'] == 'radar') { ?>
|
||||
<tr><td colspan="2">
|
||||
<p>
|
||||
|
Reference in New Issue
Block a user