Exemplo n.º 1
0
$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>';
} else {
Exemplo n.º 2
0
$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";
?>
Exemplo n.º 3
0
                     $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);
                 $svgimg->chart_value = str_replace('.', '__', $chart_value);
                 $svg_chart = $svgimg->getSvgChart_forView();
                 echo '<div id="return_divId">' . $svg_chart . '</div>';
             }
         } else {
             return false;
         }
     }
 }
Exemplo n.º 4
0
             $view->user_sort[$sort_data['name']] = $sort_data['value'];
         }
     }
     $view->update_view_query_by_userInputs();
     $view->chart_type = !empty($_GET['chart_type']) ? $_GET['chart_type'] : $view->chart_type;
     if (!empty($view->view_id) && !empty($view->chart_type)) {
         $svgimg = new getsvgimage();
         $result = $result1 = $view->findBySql($view->query_v);
         $chart_width = !empty($_GET['chart_width']) ? $_GET['chart_width'] : $view->chart_width;
         $chart_height = !empty($_GET['chart_height']) ? $_GET['chart_height'] : $view->chart_height;
         $chart_type = !empty($_GET['chart_type']) ? $_GET['chart_type'] : $view->chart_type;
         $chart_legend = !empty($_GET['chart_legend']) ? $_GET['chart_legend'] : $view->chart_legend;
         $chart_label = !empty($_GET['chart_label']) ? $_GET['chart_label'] : $view->chart_label;
         $chart_value = !empty($_GET['chart_type']) ? $_GET['chart_value'] : $view->chart_value;
         //getSvgData($result, $legend_name, $chart_label, $chart_value, $legend, $labels, $data);
         $svgimg->setProperty('_chart_name', $view->view_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);
         $svgimg->chart_value = str_replace('.', '__', $chart_value);
         $svg_chart = $svgimg->getSvgChart_forView();
         echo '<div id="return_divId">' . $svg_chart . '</div>';
     } else {
         return false;
     }
 } else {
     return false;
 }