mirror of
https://github.com/nasa/openmct.git
synced 2025-04-20 00:51:09 +00:00
Plot uses ColorPalette to allocate colors
This commit is contained in:
parent
52b8720d37
commit
cb41be7922
@ -4,7 +4,7 @@
|
||||
<span class="plot-legend-item"
|
||||
ng-repeat="series in series">
|
||||
<span class="plot-color-swatch"
|
||||
ng-style="{ 'background-color': series.color }">
|
||||
ng-style="{ 'background-color': series.color.asHexString() }">
|
||||
</span>
|
||||
<span class="title-label">{{ series.name }}</span>
|
||||
</span>
|
||||
|
@ -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
|
||||
);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user