#219 show_colour_key() for range of counts

open
nobody
None
1
2013-07-24
2013-07-24
Anonymous
No

please could you amend the function show_colour_key() so that it contains ranges rather than set values?

I personally have 30 booking types and manually put in 10 columns for this amount so that a print out all fits on one page with colur key.

maybe:

$colourcount = count($booking_types);
if ($colourcount > 20) {
$table_width = 10;
} elseif ($colourcount > 8) {
$table_width = 4;
} elseif ($colourcount > 6) {
$table_width = 3;
} else {
$table_width = 5;
}

sure there might be a fancier way of doing it. Maybe even allowing it to be overridden in the configuration.

Thanks,

Alan

Discussion


Anonymous


Cancel   Add attachments