|
|
|
@ -247,22 +247,26 @@ function (angular, $, kbn, moment, _, GraphTooltip) { |
|
|
|
|
|
|
|
|
|
|
|
sortedSeries = _.sortBy(data, function(series) { return series.zindex; }); |
|
|
|
sortedSeries = _.sortBy(data, function(series) { return series.zindex; }); |
|
|
|
|
|
|
|
|
|
|
|
function callPlot() { |
|
|
|
function callPlot(incrementRenderCounter) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
$.plot(elem, sortedSeries, options); |
|
|
|
$.plot(elem, sortedSeries, options); |
|
|
|
} catch (e) { |
|
|
|
} catch (e) { |
|
|
|
console.log('flotcharts error', e); |
|
|
|
console.log('flotcharts error', e); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (incrementRenderCounter) { |
|
|
|
|
|
|
|
scope.panelRenderingComplete(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (shouldDelayDraw(panel)) { |
|
|
|
if (shouldDelayDraw(panel)) { |
|
|
|
// temp fix for legends on the side, need to render twice to get dimensions right
|
|
|
|
// temp fix for legends on the side, need to render twice to get dimensions right
|
|
|
|
callPlot(); |
|
|
|
callPlot(false); |
|
|
|
setTimeout(callPlot, 50); |
|
|
|
setTimeout(function() { callPlot(true); }, 50); |
|
|
|
legendSideLastValue = panel.legend.rightSide; |
|
|
|
legendSideLastValue = panel.legend.rightSide; |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
callPlot(); |
|
|
|
callPlot(true); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|