added setting for continuous image
This commit is contained in:
@@ -88,6 +88,11 @@ function PMA_chart_results($data, &$chartSettings, &$chartErrors = array())
|
||||
$chartSettings['barType'] = 'stacked';
|
||||
}
|
||||
|
||||
// set default if image is continuous (one part)
|
||||
if (empty($chartSettings['continuous'])) {
|
||||
$chartSettings['continuous'] = 'off';
|
||||
}
|
||||
|
||||
// default for legend
|
||||
$chartSettings['legend'] = false;
|
||||
|
||||
|
@@ -150,7 +150,13 @@ abstract class PMA_pChart_Chart extends PMA_Chart
|
||||
$this->init();
|
||||
$this->prepareDataSet();
|
||||
$this->prepareChart();
|
||||
|
||||
if ($this->isContinuous()) {
|
||||
$this->render(1);
|
||||
}
|
||||
else {
|
||||
$this->render(20);
|
||||
}
|
||||
|
||||
$returnData = '<div id="chart">';
|
||||
foreach ($this->partsEncoded as $part) {
|
||||
@@ -196,6 +202,11 @@ abstract class PMA_pChart_Chart extends PMA_Chart
|
||||
return $this->settings['scale'];
|
||||
}
|
||||
|
||||
protected function isContinuous()
|
||||
{
|
||||
return $this->settings['continuous'] == 'on';
|
||||
}
|
||||
|
||||
protected function getImageMap()
|
||||
{
|
||||
return $this->chart->ImageMap;
|
||||
|
@@ -151,10 +151,17 @@ $url_params['reload'] = 1;
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<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"' : ''); ?>>
|
||||
<i><?php echo _('(May not work on IE8)'); ?></i>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if ($chartSettings['type'] == 'radar') { ?>
|
||||
<tr><td colspan="2">
|
||||
<p>
|
||||
When drawing a radar chart all values are normalized to a range [0..10].
|
||||
<?php echo _('When drawing a radar chart all values are normalized to a range [0..10].'); ?>
|
||||
</p>
|
||||
</td></tr>
|
||||
<?php } ?>
|
||||
|
Reference in New Issue
Block a user