Skip to content

Commit

Permalink
Annotation color bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mollybsmith-noaa committed Dec 9, 2024
1 parent c450a7b commit a04cec0
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions meteor_packages/mats-common/templates/graph/graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,12 +341,11 @@ Template.graph.helpers({
)
) {
// annotation color needs to be darkened for proper section 508 contrast compliance
const darkerAnnotationColor = LightenDarkenColor.LightenDarkenColor(
rgbHex(dataset[i].annotateColor),
-75
)
.toString()
.padStart(6, "0");
const darkerAnnotationColor = dataset[i].annotateColor
? LightenDarkenColor.LightenDarkenColor(rgbHex(dataset[i].annotateColor), -75)
.toString()
.padStart(6, "0")
: "000000";

switch (plotType) {
case matsTypes.PlotTypes.timeSeries:
Expand Down

0 comments on commit a04cec0

Please sign in to comment.