Use series.getDatum when available

This commit is contained in:
Pete Richards 2016-12-22 10:02:28 -08:00
parent c4d47ddc26
commit 6f257593c8
2 changed files with 9 additions and 3 deletions

View File

@ -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' ?

View File

@ -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) {