Function __global->_stats_get_graph_context

Definitions

sources/stats.php

  • Get context details (filter & pivot settings) for a particular graph.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$graph_details array No No required parameter N/A N/A Map of graph details
$filters array No No [] N/A N/A Filter settings to take precedence
$pivot ?mixed No No Null N/A N/A Pivot value to take precedence (null: none)
$for_kpi boolean No No False N/A N/A Whether this is for setting up a KPI

Returns

  • A pair: filters, pivot
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get context details (filter & pivot settings) for a particular graph.
 *
 * @param  array $graph_details Map of graph details
 * @param  array $filters Filter settings to take precedence
 * @param  ?mixed $pivot Pivot value to take precedence (null: none)
 * @param  boolean $for_kpi Whether this is for setting up a KPI
 * @return array A pair: filters, pivot
 */

function _stats_get_graph_context(array $graph_details, array $filters = [], $pivot = null, bool $for_kpi = false) : array