Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401] [Versions 401 and 402] [Versions 401 and 403]

   1  <?php
   2  
   3  namespace PhpOffice\PhpSpreadsheet\Chart\Renderer;
   4  
   5  /**
   6   * Jpgraph is not oficially maintained in Composer, so the version there
   7   * could be out of date. For that reason, all unit test requiring Jpgraph
   8   * are skipped. So, do not measure code coverage for this class till that
   9   * is fixed.
  10   *
  11   * This implementation uses abandoned package
  12   * https://packagist.org/packages/jpgraph/jpgraph
  13   *
  14   * @codeCoverageIgnore
  15   */
  16  class JpGraph extends JpGraphRendererBase
  17  {
  18      protected static function init(): void
  19      {
  20          static $loaded = false;
  21          if ($loaded) {
  22              return;
  23          }
  24  
  25          \JpGraph\JpGraph::load();
  26          \JpGraph\JpGraph::module('bar');
  27          \JpGraph\JpGraph::module('contour');
  28          \JpGraph\JpGraph::module('line');
  29          \JpGraph\JpGraph::module('pie');
  30          \JpGraph\JpGraph::module('pie3d');
  31          \JpGraph\JpGraph::module('radar');
  32          \JpGraph\JpGraph::module('regstat');
  33          \JpGraph\JpGraph::module('scatter');
  34          \JpGraph\JpGraph::module('stock');
  35  
  36          $loaded = true;
  37      }
  38  }