function _quant_generate_table_single in Quant 6
Take formatted data for a single-point chart and convert to a tabular format
File
- includes/
chart.inc, line 192 - Chart building functions
Code
function _quant_generate_table_single(&$quant) {
$label = "<h3>{$quant->label}</h3>";
$width = $quant->chart['#size']['#width'];
$headers = array(
t('Date'),
t('Count'),
);
$rows = array();
foreach ($quant->data as $date => $count) {
$rows[] = array(
$date,
$count,
);
}
$table = theme('table', $headers, $rows);
$quant->render = "<div class=\"quant-table\" style=\"width: {$width}px;\">{$label}{$table}</div>";
}