Added new token for static graph height
This commit is contained in:
parent
41d57dd18a
commit
4214577eea
|
@ -685,6 +685,10 @@ $options_full_escale[2] = __('On Boolean graphs');
|
|||
$table_chars->data[$row][1] = html_print_select($options_full_escale, 'full_scale_option', $config["full_scale_option"], '', '', 0, true, false, false);
|
||||
$row++;
|
||||
|
||||
$table_chars->data[$row][0] = __('Graph image height');
|
||||
$table_chars->data[$row][1] = html_print_input_text ('graph_image_height', $config['graph_image_height'], '', 20, 20, true);
|
||||
$row++;
|
||||
|
||||
/*
|
||||
$table_font->data[$row][0] = __('Font path');
|
||||
$fonts = load_fonts();
|
||||
|
|
|
@ -3223,7 +3223,7 @@ function generator_chart_to_pdf($type_graph_pdf, $params, $params_combined = fal
|
|||
$img_url = $config["homeurl"] . "attachment/" . $img_file;
|
||||
|
||||
$width_img = 500;
|
||||
$height_img = 450;
|
||||
$height_img = (isset($config['graph_image_height'])) ? $config['graph_image_height'] : 350;
|
||||
|
||||
$params_encode_json = urlencode(json_encode($params));
|
||||
|
||||
|
|
|
@ -627,6 +627,9 @@ function config_update_config () {
|
|||
|
||||
if (!config_update_value ('full_scale_option', (int) get_parameter('full_scale_option', 0)))
|
||||
$error_update[] = __('Default full scale (TIP)');
|
||||
|
||||
if (!config_update_value ('graph_image_height', (int) get_parameter('graph_image_height', 0)))
|
||||
$error_update[] = __('Default height of the chart image');
|
||||
|
||||
if (!config_update_value ('classic_menu', (bool) get_parameter('classic_menu', false)))
|
||||
$error_update[] = __('Classic menu mode');
|
||||
|
@ -1851,6 +1854,10 @@ function config_process_config () {
|
|||
config_update_value ('render_proc', 0);
|
||||
}
|
||||
|
||||
if (!isset($config['graph_image_height'])) {
|
||||
config_update_value ('graph_image_height', 350);
|
||||
}
|
||||
|
||||
if (!isset($config["render_proc_ok"])) {
|
||||
config_update_value ('render_proc_ok', __('Ok') );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue