foreach ($values as $value) { if ($value > 0) { # # Draw the box # $hover_txt = $label_lookup[$item] . ' ' . $value . '%'; $value = $value * $size_factor; if ($use_images) { $image = $bg_image_lookup[$item]; } else { $image = ''; } u::box($value, $color_lookup[$item], $offset, $image, $hover_txt, '', $bar_height); $offset = $offset + $value; } $item++; } # # Did we draw anything? # if ($offset) { # # Total percent label # $total_str = $offset / $size_factor . "%"; u::box($tail_size, '', $offset, '', $total_str, $total_str, $bar_height); } # # End the container div # u::end_tag('div', 1);