Graph: increase decimal precision in tooltip and legend values when unit scaling is applied, #1043

This commit is contained in:
Torkel Ödegaard 2014-11-12 09:09:05 +01:00
parent ebcf2c3f68
commit 882a477c0f
2 changed files with 6 additions and 1 deletions

View File

@ -106,7 +106,7 @@ function (angular, $, kbn, moment, _, GraphTooltip) {
var series = data[i];
var axis = yaxis[series.yaxis - 1];
var formater = kbn.valueFormats[scope.panel.y_formats[series.yaxis - 1]];
series.updateLegendValues(formater, axis.tickDecimals, axis.scaledDecimals);
series.updateLegendValues(formater, axis.tickDecimals, axis.scaledDecimals+ 2);
if(!scope.$$phase) { scope.$digest(); }
}
}

View File

@ -53,11 +53,16 @@ function (angular, app, _, kbn, $) {
scope.toggleSeries(seriesInfo, e);
}
function sortLegend(e) {
}
function render() {
if (firstRender) {
elem.append($container);
$container.on('click', '.graph-legend-icon', openColorSelector);
$container.on('click', '.graph-legend-alias', toggleSeries);
$container.on('click', 'th', sortLegend);
firstRender = false;
}