$requirements['charts']['description']=t('Charts core module only provides a a common set of functions. You must install a Charts provider module to create charts.');
return$requirements;
}
}
/**
* Even if the series have values with attributes,
* return only the numeric values of them.
*
* @param
* Array. A given data series with or without attributes.
* @return
* Array. A data series, but only with the values, without
* the attributes.
*/
function_charts_series_values($series){
$data=array();
foreach($seriesas$index=>$value){
if(!is_numeric($index)){
continue;
}
if(is_array($value)){
$data[]=$value['#value'];
}
else{
$data[]=$value;
}
}
return$data;
}
/**
* Implementation of hook_theme().
*/
functioncharts_theme(){
returnarray(
'_charts_settings'=>array(
'arguments'=>array('form'=>NULL),
),
);
}
<?php
// $Id$
/**
* @author Bruno Massa http://drupal.org/user/67164
* @file
* Transform DATA into INFORMATION using beautiful CHARTS.
*
* @note only hooks are here.
* @note For instructions about the API, see chart_api.txt file.
*/
/**
* The main Chart API function, that calls any chart provider
* to print the given data.
*
* @param &$data
* Array. The chart data, described on chart_api.txt
* @return
* String. The HTML with the propper chart (might include Flash or
$requirements['charts']['description']=t('Charts core module only provides a a common set of functions. You must install a Charts provider module to create charts.');
return$requirements;
}
}
/**
* Even if the series have values with attributes,
* return only the numeric values of them.
*
* @param
* Array. A given data series with or without attributes.
* @return
* Array. A data series, but only with the values, without