Commit 2cdd097b by benrubson

Missing values, correct timeStep

parent d1e8418c
...@@ -271,8 +271,14 @@ module.directive('grafanaGraph', function($rootScope, timeSrv) { ...@@ -271,8 +271,14 @@ module.directive('grafanaGraph', function($rootScope, timeSrv) {
break; break;
} }
default: { default: {
if (data.length && data[0].stats.timeStep) { var width;
options.series.bars.barWidth = data[0].stats.timeStep / 1.5; for (let i = 0; i < data.length; i++) {
if (data[i].stats.timeStep && (width == null || (data[i].stats.timeStep / 1.5) < width)) {
width = data[i].stats.timeStep / 1.5;
}
}
if (width) {
options.series.bars.barWidth = width;
} }
addTimeAxis(options); addTimeAxis(options);
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment