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 401 and 403]

   1  <?php
   2  
   3  namespace PhpOffice\PhpSpreadsheet\Chart\Renderer;
   4  
   5  /**
   6   * Jpgraph is not oficially maintained in Composer.
   7   *
   8   * This renderer implementation uses package
   9   * https://packagist.org/packages/mitoteam/jpgraph
  10   *
  11   * This package is up to date for August 2022 and has PHP 8.1 support.
  12   */
  13  class MtJpGraphRenderer extends JpGraphRendererBase
  14  {
  15      protected static function init(): void
  16      {
  17          static $loaded = false;
  18          if ($loaded) {
  19              return;
  20          }
  21  
  22          \mitoteam\jpgraph\MtJpGraph::load([
  23              'bar',
  24              'contour',
  25              'line',
  26              'pie',
  27              'pie3d',
  28              'radar',
  29              'regstat',
  30              'scatter',
  31              'stock',
  32          ]);
  33  
  34          $loaded = true;
  35      }
  36  }