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

This commit is contained in:
danielmaya 2017-11-24 11:55:25 +01:00
parent 3bc4bdb798
commit 0b728375db

View File

@ -1162,6 +1162,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