Commit d5899aac by bergquist

fix(graph-panel): fixes broken PNG rendering

When refactoring y-axies for graph panel these
was forgotten and which caused the graphite datasource
to send invalid data.

closes #5025
parent 3feb6492
...@@ -452,12 +452,21 @@ function (angular, $, moment, _, kbn, GraphTooltip) { ...@@ -452,12 +452,21 @@ function (angular, $, moment, _, kbn, GraphTooltip) {
url += panel.fill !== 0 ? ('&areaAlpha=' + (panel.fill/10).toFixed(1)) : ''; url += panel.fill !== 0 ? ('&areaAlpha=' + (panel.fill/10).toFixed(1)) : '';
url += panel.linewidth !== 0 ? '&lineWidth=' + panel.linewidth : ''; url += panel.linewidth !== 0 ? '&lineWidth=' + panel.linewidth : '';
url += panel.legend.show ? '&hideLegend=false' : '&hideLegend=true'; url += panel.legend.show ? '&hideLegend=false' : '&hideLegend=true';
url += panel.grid.leftMin !== null ? '&yMin=' + panel.grid.leftMin : '';
url += panel.grid.leftMax !== null ? '&yMax=' + panel.grid.leftMax : ''; if (panel.yaxes && panel.yaxes.length > 0) {
url += panel.grid.rightMin !== null ? '&yMin=' + panel.grid.rightMin : ''; var showYaxis = false;
url += panel.grid.rightMax !== null ? '&yMax=' + panel.grid.rightMax : ''; for(var i = 0; panel.yaxes.length > i; i++) {
url += panel['x-axis'] ? '' : '&hideAxes=true'; if (panel.yaxes[i].show) {
url += panel['y-axis'] ? '' : '&hideYAxis=true'; url += (panel.yaxes[i].min !== null && panel.yaxes[i].min !== undefined) ? '&yMin=' + panel.yaxes[i].min : '';
url += (panel.yaxes[i].max !== null && panel.yaxes[i].max !== undefined) ? '&yMax=' + panel.yaxes[i].max : '';
showYaxis = true;
break;
}
}
url += showYaxis ? '' : '&hideYAxis=true';
}
url += panel.xaxis.show ? '' : '&hideAxes=true';
switch(panel.yaxes[0].format) { switch(panel.yaxes[0].format) {
case 'bytes': case 'bytes':
......
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