You are here

private function PHPExcel_Chart_Renderer_jpgraph::_renderCartesianPlotArea in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Renderer/jpgraph.php \PHPExcel_Chart_Renderer_jpgraph::_renderCartesianPlotArea()
8 calls to PHPExcel_Chart_Renderer_jpgraph::_renderCartesianPlotArea()
PHPExcel_Chart_Renderer_jpgraph::_renderAreaChart in vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Renderer/jpgraph.php
PHPExcel_Chart_Renderer_jpgraph::_renderBarChart in vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Renderer/jpgraph.php
PHPExcel_Chart_Renderer_jpgraph::_renderBubbleChart in vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Renderer/jpgraph.php
PHPExcel_Chart_Renderer_jpgraph::_renderCombinationChart in vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Renderer/jpgraph.php
PHPExcel_Chart_Renderer_jpgraph::_renderContourChart in vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Renderer/jpgraph.php

... See full list

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Renderer/jpgraph.php, line 214

Class

PHPExcel_Chart_Renderer_jpgraph
PHPExcel_Chart_Renderer_jpgraph

Code

private function _renderCartesianPlotArea($type = 'textlin') {
  $this->_graph = new Graph(self::$_width, self::$_height);
  $this->_graph
    ->SetScale($type);
  $this
    ->_renderTitle();

  //	Rotate for bar rather than column chart
  $rotation = $this->_chart
    ->getPlotArea()
    ->getPlotGroupByIndex(0)
    ->getPlotDirection();
  $reverse = $rotation == 'bar' ? true : false;
  $xAxisLabel = $this->_chart
    ->getXAxisLabel();
  if (!is_null($xAxisLabel)) {
    $title = $this
      ->_getCaption($xAxisLabel);
    if (!is_null($title)) {
      $this->_graph->xaxis
        ->SetTitle($title, 'center');
      $this->_graph->xaxis->title
        ->SetMargin(35);
      if ($reverse) {
        $this->_graph->xaxis->title
          ->SetAngle(90);
        $this->_graph->xaxis->title
          ->SetMargin(90);
      }
    }
  }
  $yAxisLabel = $this->_chart
    ->getYAxisLabel();
  if (!is_null($yAxisLabel)) {
    $title = $this
      ->_getCaption($yAxisLabel);
    if (!is_null($title)) {
      $this->_graph->yaxis
        ->SetTitle($title, 'center');
      if ($reverse) {
        $this->_graph->yaxis->title
          ->SetAngle(0);
        $this->_graph->yaxis->title
          ->SetMargin(-55);
      }
    }
  }
}