Beispiel #1
0
 $report->per_page = !empty($_GET['per_page']) ? $_GET['per_page'] : 20;
 $report->extn_report_id = $_GET['extn_report_id'];
 if (!empty($_GET['filter_data'])) {
     foreach ($_GET['filter_data'] as $filter_data) {
         $report->user_filter[$filter_data['name']] = $filter_data['value'];
     }
 }
 if (!empty($_GET['sort_data'])) {
     foreach ($_GET['sort_data'] as $sort_data) {
         $report->user_sort[$sort_data['name']] = $sort_data['value'];
     }
 }
 $report->update_extn_report_query_by_userInputs();
 $report->chart_type = !empty($_GET['chart_type']) ? $_GET['chart_type'] : $report->chart_type;
 if (!empty($report->extn_report_id) && !empty($report->chart_type)) {
     $svgimg = new getsvgimage();
     $result = $result1 = $report->findBySql($report->query_v);
     $chart_width = !empty($_GET['chart_width']) ? $_GET['chart_width'] : $report->chart_width;
     $chart_height = !empty($_GET['chart_height']) ? $_GET['chart_height'] : $report->chart_height;
     $chart_type = !empty($_GET['chart_type']) ? $_GET['chart_type'] : $report->chart_type;
     $chart_legend = !empty($_GET['chart_legend']) ? $_GET['chart_legend'] : $report->chart_legend;
     $chart_label = !empty($_GET['chart_label']) ? $_GET['chart_label'] : $report->chart_label;
     $chart_value = !empty($_GET['chart_type']) ? $_GET['chart_value'] : $report->chart_value;
     //getSvgData($result, $legend_name, $chart_label, $chart_value, $legend, $labels, $data);
     $svgimg->setProperty('_chart_name', $report->report_name);
     $svgimg->setProperty('_chart_width', $chart_width);
     $svgimg->setProperty('_chart_height', $chart_height);
     $svgimg->setProperty('_chart_type', $chart_type);
     $svgimg->result = $result;
     $svgimg->legend_name = str_replace('.', '__', $chart_legend);
     $svgimg->chart_label = str_replace('.', '__', $chart_label);
$view_i->view_id = 12;
$view_i->viewResultById();
?>
      </div>

      <div id="tabsHeader-5" class="tabContent">
       <div>                
        <?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>';
Beispiel #3
0
$svgimage7->setProperty('_chart_width', $chart_width);
$svgimage7->setProperty('_chart_height', $chart_height);
$svgimage7->setProperty('_chart_type', 'pie');
$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";