mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2024-11-25 23:06:03 +03:00
Fixed rendering of stock charts with jpgraph
This commit is contained in:
parent
cb5fc9532f
commit
47f3888664
@ -524,8 +524,8 @@ class PHPExcel_Chart_Renderer_jpgraph
|
||||
$dataValues = array();
|
||||
|
||||
// Loop through each data series in turn
|
||||
for($i = 0; $i < $seriesCount; ++$i) {
|
||||
$dataValuesX = $this->_chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues();
|
||||
foreach($plotOrder as $i => $v) {
|
||||
$dataValuesX = $this->_chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($v)->getDataValues();
|
||||
foreach($dataValuesX as $j => $dataValueX) {
|
||||
$dataValues[$plotOrder[$i]][$j] = $dataValueX;
|
||||
}
|
||||
@ -543,11 +543,16 @@ class PHPExcel_Chart_Renderer_jpgraph
|
||||
}
|
||||
}
|
||||
|
||||
$xAxisLabel = $this->_chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0)->getDataValues();
|
||||
|
||||
$seriesPlot = new StockPlot($dataValuesPlot, $xAxisLabel);
|
||||
$seriesPlot = new StockPlot($dataValuesPlot);
|
||||
$seriesPlot->SetWidth(20);
|
||||
|
||||
$labelCount = count($this->_chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex(0)->getPointCount());
|
||||
if ($labelCount > 0) {
|
||||
$datasetLabels = $this->_chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0)->getDataValues();
|
||||
$datasetLabels = $this->_formatDataSetLabels($groupID, $datasetLabels, $labelCount);
|
||||
$this->_graph->xaxis->SetTickLabels($datasetLabels);
|
||||
}
|
||||
|
||||
$this->_graph->Add($seriesPlot);
|
||||
} // function _renderPlotStock()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user