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