Trying to adjust graph render sizes
This commit is contained in:
parent
b625f2e5c8
commit
73567f1859
|
@ -96,9 +96,13 @@ if (file_exists ('languages/'.$user_language.'.mo')) {
|
||||||
|
|
||||||
|
|
||||||
$params['only_image'] = false;
|
$params['only_image'] = false;
|
||||||
$params['width'] = '1048';
|
$params['width'] = (int) $_REQUEST['viewport_width'];
|
||||||
$params['menu'] = false;
|
$params['menu'] = false;
|
||||||
|
|
||||||
|
if((!isset($params['width']) || ($params['width'] <= 0)) {
|
||||||
|
$params['width'] = 1048;
|
||||||
|
}
|
||||||
|
|
||||||
$params_combined = json_decode($_REQUEST['data_combined'], true);
|
$params_combined = json_decode($_REQUEST['data_combined'], true);
|
||||||
$module_list = json_decode($_REQUEST['data_module_list'], true);
|
$module_list = json_decode($_REQUEST['data_module_list'], true);
|
||||||
$type_graph_pdf = $_REQUEST['type_graph_pdf'];
|
$type_graph_pdf = $_REQUEST['type_graph_pdf'];
|
||||||
|
|
|
@ -3252,11 +3252,14 @@ function generator_chart_to_pdf($type_graph_pdf, $params, $params_combined = fal
|
||||||
$result = exec($cmd);
|
$result = exec($cmd);
|
||||||
|
|
||||||
if($params['return_img_base_64']){
|
if($params['return_img_base_64']){
|
||||||
|
// To be used in alerts
|
||||||
|
$width_img = 500;
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
// to be used in PDF files
|
||||||
$config["temp_images"][] = $img_path;
|
$config["temp_images"][] = $img_path;
|
||||||
return '<img src="' . $img_url . '" />';
|
return '<img style="width: 100%;height: ' . $height_img . '" src="' . $img_url . '" />';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,12 +31,14 @@ if(type_graph_pdf == 'combined'){
|
||||||
"&data_combined=" + url_params_comb +
|
"&data_combined=" + url_params_comb +
|
||||||
"&data_module_list=" + url_module_list +
|
"&data_module_list=" + url_module_list +
|
||||||
"&type_graph_pdf=" + type_graph_pdf +
|
"&type_graph_pdf=" + type_graph_pdf +
|
||||||
"&session_id=" + session_id;
|
"&session_id=" + session_id +
|
||||||
|
"&viewport_width=" + viewport_width;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
post_data = "data=" + url_params +
|
post_data = "data=" + url_params +
|
||||||
"&type_graph_pdf=" + type_graph_pdf +
|
"&type_graph_pdf=" + type_graph_pdf +
|
||||||
"&session_id=" + session_id;
|
"&session_id=" + session_id +
|
||||||
|
"&viewport_width=" + viewport_width;
|
||||||
}
|
}
|
||||||
|
|
||||||
page.viewportSize = { width: _width, height: _height };
|
page.viewportSize = { width: _width, height: _height };
|
||||||
|
|
Loading…
Reference in New Issue