You are here

function d3_views_plugin_style_d3::getAggregation in d3.js 7

Get the current field mapping's aggregation setting.

Parameters

string $key1: The base view field key.

string $key2: For view fields that have sub-fields, this is the sub-field key.

Return value

string Setting for the particular aggregation, or FALSE.

1 call to d3_views_plugin_style_d3::getAggregation()
d3_views_plugin_style_d3::aggregate in modules/d3_views/views/plugins/d3_views_plugin_style_d3.inc
Wrapper function to determine the methods to use, and execute it.

File

modules/d3_views/views/plugins/d3_views_plugin_style_d3.inc, line 148
Contains the d3 style plugin.

Class

d3_views_plugin_style_d3
Style plugin to render a d3 visualization

Code

function getAggregation($key1, $key2 = FALSE) {
  if ($key2) {
    return !empty($this->options['fields'][$key1][$key2]['aggregation']) ? $this->options['fields'][$key1][$key2]['aggregation'] : FALSE;
  }
  return !empty($this->options['fields'][$key1]['aggregation']) ? $this->options['fields'][$key1]['aggregation'] : FALSE;
}