Min value always must be 0 in y axis. Ticket #345

This commit is contained in:
Arturo Gonzalez 2017-02-28 08:52:47 +01:00
parent 19dcc729da
commit 4d89b6496f
1 changed files with 1 additions and 1 deletions

View File

@ -1577,7 +1577,6 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
} }
var stack = 0, bars = true, lines = false, steps = false; var stack = 0, bars = true, lines = false, steps = false;
var plot = $.plot($('#' + graph_id), datas, options); var plot = $.plot($('#' + graph_id), datas, options);
// Re-calculate the graph height with the legend height // Re-calculate the graph height with the legend height
@ -1881,6 +1880,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
} }
function yFormatter(v, axis) { function yFormatter(v, axis) {
axis.datamin = 0;
var formatted = number_format(v,force_integer,unit); var formatted = number_format(v,force_integer,unit);
return '<div class='+font+' style=font-size:'+font_size+'pt>'+formatted+'</div>'; return '<div class='+font+' style=font-size:'+font_size+'pt>'+formatted+'</div>';