From 77f6449db9768190d3b6f847d14a1d24153f91b9 Mon Sep 17 00:00:00 2001 From: utkarshcmu Date: Tue, 1 Mar 2016 00:20:34 -0800 Subject: [PATCH] Added millisecond detection in series --- public/app/core/time_series2.ts | 10 ++++++++++ public/app/plugins/panel/graph/graph_tooltip.js | 12 +++++++++--- public/app/plugins/panel/graph/module.ts | 3 +++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/public/app/core/time_series2.ts b/public/app/core/time_series2.ts index ef2e6b9c8b2..abc2a7f5436 100644 --- a/public/app/core/time_series2.ts +++ b/public/app/core/time_series2.ts @@ -168,4 +168,14 @@ export default class TimeSeries { formatValue(value) { return this.valueFormater(value, this.decimals, this.scaledDecimals); } + + isMsResolutionNeeded() { + for (var j = 0; j'; diff --git a/public/app/plugins/panel/graph/module.ts b/public/app/plugins/panel/graph/module.ts index 357da9b6877..bf89648b717 100644 --- a/public/app/plugins/panel/graph/module.ts +++ b/public/app/plugins/panel/graph/module.ts @@ -69,6 +69,7 @@ var panelDefaults = { tooltip : { value_type: 'cumulative', shared: true, + msResolution: false, }, // time overrides timeFrom: null, @@ -200,6 +201,8 @@ class GraphCtrl extends MetricsPanelCtrl { } this.datapointsCount += datapoints.length; + + this.panel.tooltip.msResolution = this.panel.tooltip.msResolution || series.isMsResolutionNeeded(); } return series;