Merge branch '1638-Si-creamos-una-gráfica-combinada-con-un-intervalo-pequeño-sale-vacía-dev' into 'develop'

Fixed interval when the period is less than resolution in custom graph

See merge request artica/pandorafms!1118
This commit is contained in:
vgilc 2018-01-29 12:53:27 +01:00
commit 717ecb6adc
1 changed files with 3 additions and 0 deletions

View File

@ -1176,6 +1176,9 @@ function graphic_combined_module ($module_list, $weight_list, $period,
$datelimit = $date - $period;
$resolution = $config['graph_res'] * 50; //Number of points of the graph
if($resolution > $period){
$resolution = $period;
}
$interval = (int) ($period / $resolution);
// If projection graph, fill with zero previous data to projection interval