[Telemetry] Refactor plot to use TelemetryFormatter

Refactor plot view to use an injected telemetry formatter,
instead of explicitly including moment. WTD-599.
This commit is contained in:
Victor Woeltjen
2014-12-24 10:59:34 -08:00
parent b080f90f64
commit fc0376296d
8 changed files with 62 additions and 14 deletions

View File

@ -11,12 +11,12 @@ define(
* @constructor
* @param {DomainObject[]} the domain objects to be plotted
*/
function PlotStackMode(telemetryObjects) {
function PlotStackMode(telemetryObjects, subPlotFactory) {
var domainOffset,
panZoomStackGroup =
new PlotPanZoomStackGroup(telemetryObjects.length),
subplots = telemetryObjects.map(function (telemetryObject, i) {
return new SubPlot(
return subPlotFactory.createSubPlot(
[telemetryObject],
panZoomStackGroup.getPanZoomStack(i)
);