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';
|
$chartSettings['barType'] = 'stacked';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// set default if image is continuous (one part)
|
||||||
|
if (empty($chartSettings['continuous'])) {
|
||||||
|
$chartSettings['continuous'] = 'off';
|
||||||
|
}
|
||||||
|
|
||||||
// default for legend
|
// default for legend
|
||||||
$chartSettings['legend'] = false;
|
$chartSettings['legend'] = false;
|
||||||
|
|
||||||
|
@@ -150,7 +150,13 @@ abstract class PMA_pChart_Chart extends PMA_Chart
|
|||||||
$this->init();
|
$this->init();
|
||||||
$this->prepareDataSet();
|
$this->prepareDataSet();
|
||||||
$this->prepareChart();
|
$this->prepareChart();
|
||||||
$this->render(20);
|
|
||||||
|
if ($this->isContinuous()) {
|
||||||
|
$this->render(1);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->render(20);
|
||||||
|
}
|
||||||
|
|
||||||
$returnData = '<div id="chart">';
|
$returnData = '<div id="chart">';
|
||||||
foreach ($this->partsEncoded as $part) {
|
foreach ($this->partsEncoded as $part) {
|
||||||
@@ -196,6 +202,11 @@ abstract class PMA_pChart_Chart extends PMA_Chart
|
|||||||
return $this->settings['scale'];
|
return $this->settings['scale'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function isContinuous()
|
||||||
|
{
|
||||||
|
return $this->settings['continuous'] == 'on';
|
||||||
|
}
|
||||||
|
|
||||||
protected function getImageMap()
|
protected function getImageMap()
|
||||||
{
|
{
|
||||||
return $this->chart->ImageMap;
|
return $this->chart->ImageMap;
|
||||||
|
@@ -151,10 +151,17 @@ $url_params['reload'] = 1;
|
|||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?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') { ?>
|
<?php if ($chartSettings['type'] == 'radar') { ?>
|
||||||
<tr><td colspan="2">
|
<tr><td colspan="2">
|
||||||
<p>
|
<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>
|
</p>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
Reference in New Issue
Block a user