From 602c8229e86e7eae84a2dfd549638ee66450d8c3 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Mon, 4 Nov 2019 10:29:23 +0000 Subject: [PATCH 1/2] Use the same line color for aggregates between versions --- new-pipeline/src/evo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/new-pipeline/src/evo.js b/new-pipeline/src/evo.js index e969cbc2..90fa34a4 100644 --- a/new-pipeline/src/evo.js +++ b/new-pipeline/src/evo.js @@ -934,7 +934,7 @@ var Line = (function () { return this.aggregate + " " + this.measure + " for " + getHumanReadableChannelName(this.channelVersion); }; Line.prototype.getStateString = function Line_getTitleString() { - return this.aggregate + "/" + this.measure + "/" + getHumanReadableChannelName(this.channelVersion).replace(' ', '-'); + return this.aggregate + "/" + this.measure; }; return Line; From 07d541748ec316a81b40f3d56078745f610e9b56 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Mon, 4 Nov 2019 10:44:18 +0000 Subject: [PATCH 2/2] Rename Line.getStateString to Line.getColorId as this is the only use --- new-pipeline/src/evo.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/new-pipeline/src/evo.js b/new-pipeline/src/evo.js index 90fa34a4..928721ba 100644 --- a/new-pipeline/src/evo.js +++ b/new-pipeline/src/evo.js @@ -913,12 +913,12 @@ var Line = (function () { this.values = values || []; // Assign a color to the line - var stateString = this.getStateString(); - if (!lineColors.hasOwnProperty(stateString)) { + var colorId = this.getColorId(); + if (!lineColors.hasOwnProperty(colorId)) { goodColorIndex = (goodColorIndex + 1) % goodColors.length; - lineColors[stateString] = goodColors[goodColorIndex]; + lineColors[colorId] = goodColors[goodColorIndex]; } - this.color = lineColors[stateString]; + this.color = lineColors[colorId]; } Line.prototype.getVersionString = function Line_getVersionString() { @@ -933,7 +933,7 @@ var Line = (function () { } return this.aggregate + " " + this.measure + " for " + getHumanReadableChannelName(this.channelVersion); }; - Line.prototype.getStateString = function Line_getTitleString() { + Line.prototype.getColorId = function Line_getColorId() { return this.aggregate + "/" + this.measure; };