Commit 882a477c by Torkel Ödegaard

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

parent ebcf2c3f
......@@ -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(); }
}
}
......
......@@ -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;
}
......
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