[Plot] Add switcher for Stacked/Overlaid

Add switcher to handle changing between Stacked and Overlaid
plots. WTD-625.
This commit is contained in:
Victor Woeltjen
2014-12-10 18:29:18 -08:00
parent 4173dd748b
commit 3a0e80d360
3 changed files with 80 additions and 4 deletions

View File

@ -0,0 +1,36 @@
/*global define*/
define(
[],
function (PlotOverlayMode, PlotStackedMode) {
"use strict";
var STACKED = {
key: "stacked",
name: "Stacked",
glyph: "8"
},
OVERLAID = {
key: "overlaid",
name: "Overlaid",
glyph: "6"
};
function PlotModeOptions(telemetryObjects) {
var options = telemetryObjects.length > 1 ?
[ STACKED, OVERLAID ] : [ OVERLAID, STACKED ];
return {
getModeOptions: function () {
return options;
},
getMode: function (option) {
}
};
}
return PlotModeOptions;
}
);