mirror of
https://github.com/nasa/openmct.git
synced 2025-06-15 21:58:13 +00:00
Plot uses ColorPalette to allocate colors
This commit is contained in:
@ -1,7 +1,8 @@
|
||||
/*global define*/
|
||||
|
||||
define(
|
||||
function () {
|
||||
['../ColorPalette.js'],
|
||||
function (ColorPalette) {
|
||||
"use strict";
|
||||
|
||||
// TODO: Store this in more accessible locations / retrieve from
|
||||
@ -13,6 +14,7 @@ define(
|
||||
var isLive = true;
|
||||
var maxDomain = +new Date();
|
||||
var subscriptions = [];
|
||||
var palette = new ColorPalette();
|
||||
var setToDefaultViewport = function() {
|
||||
// TODO: We shouldn't set the viewport until we have received data or something has given us a reasonable viewport.
|
||||
$scope.viewport = {
|
||||
@ -63,7 +65,7 @@ define(
|
||||
var series = {
|
||||
name: model.name,
|
||||
// TODO: Bring back PlotPalette.
|
||||
color: [0.12549019607843137, 0.6980392156862745, 0.6666666666666666, 1],
|
||||
color: palette.getColor(),
|
||||
data: []
|
||||
};
|
||||
|
||||
|
@ -107,7 +107,7 @@ define(
|
||||
lines.forEach(function(line) {
|
||||
drawAPI.drawLine(
|
||||
line.buffer,
|
||||
line.color,
|
||||
line.color.asRGBAArray(),
|
||||
line.pointCount
|
||||
);
|
||||
});
|
||||
|
Reference in New Issue
Block a user