Exemplo n.º 1
0
    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;
        ?>