Exemplo n.º 1
0
        <?php 
$raw = new ra_wip();
$legend_w = [];
$chart_a_w = [];
$reports_w = $raw->ra_report_set_wip();
$chart_settings_w = $raw->ra_report_wip_value_byItem_settings;
foreach ($reports_w as $key => $report_data_w) {
    $key_name_setting = $key . '_settings';
    $svgimage = new getsvgimage();
    $svgimage->setProperty('_settings', $chart_settings_w);
    if (property_exists($raw, $key_name_setting)) {
        $this_chart_settings = $raw->{$key_name_setting};
        $svgimage->setProperty('_settings', $this_chart_settings);
    }
    $svgimage->setProperty('_data', $report_data_w);
    $chart = $svgimage->draw_chart();
    array_push($chart_a_w, $chart);
}
if (is_array($chart_a_w)) {
    echo "<ul id='charts_in_report'>";
    foreach ($chart_a_w as $key => $chart_image) {
        echo "<li class=\"chart_no_{$key}\">{$chart_image}</li>";
    }
    echo '</ul>';
} else {
    echo $chart_a_w;
}
?>
       </div>
      </div>
     </div>
Exemplo n.º 2
0
$svgimage7->setProperty('_data', $data3);
$chart_image7 = $svgimage7->draw_chart();
$svgimage8 = new getsvgimage();
$svgimage8->setProperty('_chart_name', $chart_name);
$svgimage8->setProperty('_chart_width', $chart_width);
$svgimage8->setProperty('_chart_height', $chart_height);
$svgimage8->setProperty('_chart_type', 'donut');
$svgimage8->setProperty('_data', $data3);
$chart_image8 = $svgimage8->draw_chart();
$svgimage9 = new getsvgimage();
$data2 = [array('label' => 'standrad po', 'value' => array('300', '250', '1228', '340', '150', '128', '1300', '20', '1228')), array('label' => 'blanket po', 'value' => array('23', '111', '345', '250', '1228', '340', '250', '1228', '340')), array('label' => 'planned po', 'value' => array('343', '78', '900', '23', '111', '345', '23', '111', '345'))];
$data5 = ['Opportunity' => '80', 'Leads' => '190', 'Quotes' => '70', 'Sales' => '40'];
$svgimage10 = new getsvgimage();
$svgimage10->setProperty('_chart_name', $chart_name);
$svgimage10->setProperty('_chart_width', $chart_width);
$svgimage10->setProperty('_chart_height', $chart_height);
$svgimage10->setProperty('_chart_type', 'funnel');
$svgimage10->setProperty('_bottom_margin', '30');
$svgimage10->setProperty('_data', $data5);
$chart_image10 = $svgimage10->draw_chart();
$svgimage9->setProperty('_chart_name', $chart_name);
$svgimage9->setProperty('_chart_width', $chart_width);
$svgimage9->setProperty('_chart_height', $chart_height);
$svgimage9->setProperty('_chart_type', 'line');
$svgimage9->setProperty('_legend', $legend);
$svgimage9->setProperty('_data', $data2);
$chart_image9 = $svgimage9->draw_chart();
require_once INC_BASICS . DS . "getsvgimage_template.inc";
?>