Function __global->graph_pie_chart

Definitions

sources/graphs.php

  • Generate a pie chart.1 measure across one small even dimension (different segments) and one uneven dimension (angle) [unlabelled dimensions].
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: object

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$datapoints array No No required parameter N/A N/A Data-points to render
$options array No No [] N/A N/A Map of additional fiddly options
$color_pool ?array No No [] N/A N/A Colour pool to use (null: default colour pool)
$width ?string No No Null N/A N/A Width (null: responsive)
$height ?string No No Null N/A N/A Height (null: responsive)

Returns

  • The chart
  • Type: Tempcode
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Generate a pie chart.1 measure across one small even dimension (different segments) and one uneven dimension (angle) [unlabelled dimensions].
 *
 * @param  array $datapoints Data-points to render
 * @param  array $options Map of additional fiddly options
 * @param  ?array $color_pool Colour pool to use (null: default colour pool)
 * @param  ?string $width Width (null: responsive)
 * @param  ?string $height Height (null: responsive)
 * @return Tempcode The chart
 */

function graph_pie_chart(array $datapoints, array $options = [], ?array $color_pool = [], ?string $width = null, ?string $height = null) : object