"><?php echo $title; ?> </a></h1> <div class="clear section"> <?php foreach ($inner as $inner_title => $funnel) { $steps = array(); $i++; $j = 0; foreach ($funnel['steps'] as $key => $step) { $tuple = array($j++); $g = new Graph_Graphlot($time); $g->addMetric($funnel['prefix'] . ".{$key}"); $step_data = $g->getData(false); $tuple[] = Graph_Graphlot::sum($step_data[0]["data"]); $steps[] = $tuple; } $data = array(array("label" => $inner_title, 'data' => $steps)); $data = json_encode($data); $ticks = Graph_Graphlot::zip(range(0, count($steps) - 1), array_values($funnel['steps'])); $options = json_encode(array("xaxis" => array('ticks' => $ticks))); $slug = ""; $slug = slugify($title) . '_' . slugify($inner_title); $container_id = "f-container-{$i}"; $container_selector = "#{$container_id}"; ?> <div id="<?php echo $container_id;
if (isset($end_time)) { $g->until = $end_time; } $options = (object) array(); foreach ($graph['metrics'] as $m) { call_user_func_array(array($g, 'addMetric'), $m); // $g->addMetric($m[0], $m[1]); } if (isset($graph['coarsen'])) { $g->coarsen($graph['coarsen']); } if (isset($graph['options']) && $graph['options']) { $options = $graph['options']; } $options = json_encode($options); $data = $g->getData(true); $slug = slugify($title) . '_' . slugify($graph['title']); ?> <div id="g-container-<?php echo $i; ?> " class="container<?php if (isset($graph['wide']) && $graph['wide']) { ?> container-wide<?php } ?> "> <h2 id="<?php echo $slug; ?>