Skip to content

Commit

Permalink
Fix spectrum scalers on chart not being colored the same as spectrum …
Browse files Browse the repository at this point in the history
…lines.
  • Loading branch information
wcjohns committed Sep 6, 2024
1 parent f33fdcb commit a08f57c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 19 deletions.
42 changes: 25 additions & 17 deletions d3_resources/SpectrumChartD3.css
Original file line number Diff line number Diff line change
Expand Up @@ -251,24 +251,32 @@ svg.SpectrumChartD3 {
.scalerheader{ fill: rgba(185,185,185,0.80); fill-opacity: 0.55; }
.activescaler > g > .scalerheader{ fill: #909090; fill-opacity: 0.95; }

.SpectrumChartD3 .scalertxt{
fill: var(--d3spec-text-color, black);
}
.scaleraxis {
stroke-opacity: 0.8;
fill-opacity: 0.3;
stroke: var(--d3spec-axis-color, black);
}

.scalertoggle {
stroke: var(--d3spec-axis-color, black);
}

.SpectrumChartD3 .scalertxt{
fill: var(--d3spec-text-color, black);
}
.scaleraxis {
stroke-opacity: 0.8;
fill-opacity: 0.3;
stroke: var(--d3spec-axis-color, black);
}

.leftbuttonzoombox {
fill: #666;
fill-opacity: 0.25;
}
.scalertoggle {
stroke: var(--d3spec-axis-color, black);
}

.BackgroundScaler .scaleraxis, .BackgroundScaler .scalertoggle {
fill: var(--d3spec-back-line-color, black);
}

.SecondaryScaler .scaleraxis.secondary, .SecondaryScaler .scalertoggle.secondary {
fill: var(--d3spec-second-line-color, black);
}


.leftbuttonzoombox {
fill: #666;
fill-opacity: 0.25;
}

.leftbuttonzoomoutboxy {
fill: #666;
Expand Down
9 changes: 7 additions & 2 deletions d3_resources/SpectrumChartD3.js
Original file line number Diff line number Diff line change
Expand Up @@ -6325,12 +6325,17 @@ SpectrumChartD3.prototype.drawScalerBackgroundSecondary = function() {
if (spectrumScaleFactor != null && spectrumScaleFactor >= 0) {
scalenum += 1;

let speccolor = spectrum.lineColor ? spectrum.lineColor : 'black';
const speccolor = spectrum.lineColor; //If null, will use CSS variables

var spectrumSliderArea = self.scalerWidgetBody.append("g")
.attr("id", spectrumSelector + "SliderArea")
.attr("transform","translate(" + 20*(scalenum-1) + "," + ypos + ")");


if( spectrum.type === self.spectrumTypes.BACKGROUND )
spectrumSliderArea.attr("class", "BackgroundScaler");
else if( spectrum.type === self.spectrumTypes.SECONDARY )
spectrumSliderArea.attr("class", "SecondaryScaler");

spectrum.sliderText = spectrumSliderArea.append("text")
.attr("class", "scalertxt")
.attr("x", 0)
Expand Down

0 comments on commit a08f57c

Please sign in to comment.