From 6f257593c80dce615c417e8f2ae9ab00c92a777a Mon Sep 17 00:00:00 2001 From: Pete Richards Date: Thu, 22 Dec 2016 10:02:28 -0800 Subject: [PATCH] Use series.getDatum when available --- platform/telemetry/src/TelemetryHandle.js | 9 ++++++--- src/api/telemetry/LegacyTelemetryProvider.js | 3 +++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/platform/telemetry/src/TelemetryHandle.js b/platform/telemetry/src/TelemetryHandle.js index 7cc802fdee..f28f435249 100644 --- a/platform/telemetry/src/TelemetryHandle.js +++ b/platform/telemetry/src/TelemetryHandle.js @@ -122,9 +122,12 @@ define( */ self.getDatum = function (telemetryObject, index) { function makeNewDatum(series) { - return series ? - subscription.makeDatum(telemetryObject, series, index) : - undefined; + if (series) { + if (series.getDatum) { + return series.getDatum(index); + } + return subscription.makeDatum(telemetryObject, series, index); + } } return typeof index !== 'number' ? diff --git a/src/api/telemetry/LegacyTelemetryProvider.js b/src/api/telemetry/LegacyTelemetryProvider.js index 672fb9c83f..f76fe99d10 100644 --- a/src/api/telemetry/LegacyTelemetryProvider.js +++ b/src/api/telemetry/LegacyTelemetryProvider.js @@ -45,6 +45,9 @@ define([ }; function createDatum(domainObject, metadata, legacySeries, i) { + if (legacySeries.getDatum) { + return legacySeries.getDatum(i); + } var datum = {}; metadata.domains.reduce(function (d, domain) {