Commit 5f3fc149 authored by M Parker's avatar M Parker

Fix unstated dependency on custom module.

parent 987e7ca3
......@@ -42,7 +42,7 @@ function d3_sankey_table_group_pp_field_formatter_view($entity_type, $entity, $f
// the table grouping preprocessor.
if ($display['type'] === 'tablefield_d3_sankey_table_group_pp') {
foreach ($items as $delta => $item) {
$chart = _uw_career_common_chart_options();
$chart = _d3_sankey_table_group_pp_default_chart_options();
// Initialize a GroupingPreprocessor, feed it the query results, get the
// raw data out of the preprocessor, and add it to the chart.
......@@ -62,3 +62,24 @@ function d3_sankey_table_group_pp_field_formatter_view($entity_type, $entity, $f
return $element;
}
/**
* Returns some default chart options for Sankey charts generated here.
*
* @return array
* An array of common Sankey chart settings.
*/
function _d3_sankey_table_group_pp_default_chart_options() {
return array(
'type' => 'sankey',
'id' => 'visualization',
'sankeyType' => D3_SANKEY_SANKEYTYPE_PATH,
'width' => '720',
'height' => '500',
'nodeWidth' => 24,
'nodePadding' => 8,
'spread' => TRUE,
'iterations' => 5,
'alignLabel' => D3_SANKEY_ALIGNLABEL_AUTO,
);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment