Function __global->graph_bar_chart
Definitions
sources/graphs.php
- Generate a bar chart.1 measure across one large even dimension (x) and one uneven dimension (y).
- 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 |
| $x_axis_label | mixed | No | No | Blank (empty string) | N/A | N/A | X-axis label, provided in plain-text format (string or Tempcode) |
| $y_axis_label | mixed | No | No | Blank (empty string) | N/A | N/A | Y-axis label, provided in plain-text format (string or Tempcode) |
| $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 bar chart.1 measure across one large even dimension (x) and one uneven dimension (y).
*
* @param array $datapoints Data-points to render
* @param mixed $x_axis_label X-axis label, provided in plain-text format (string or Tempcode)
* @param mixed $y_axis_label Y-axis label, provided in plain-text format (string or Tempcode)
* @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_bar_chart(array $datapoints, $x_axis_label = '', $y_axis_label = '', array $options = [], ?array $color_pool = [], ?string $width = null, ?string $height = null) : object
* Generate a bar chart.1 measure across one large even dimension (x) and one uneven dimension (y).
*
* @param array $datapoints Data-points to render
* @param mixed $x_axis_label X-axis label, provided in plain-text format (string or Tempcode)
* @param mixed $y_axis_label Y-axis label, provided in plain-text format (string or Tempcode)
* @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_bar_chart(array $datapoints, $x_axis_label = '', $y_axis_label = '', array $options = [], ?array $color_pool = [], ?string $width = null, ?string $height = null) : object
