diff --git a/d3_resources/SpectrumChartD3.css b/d3_resources/SpectrumChartD3.css index fffad90..bfe30b3 100644 --- a/d3_resources/SpectrumChartD3.css +++ b/d3_resources/SpectrumChartD3.css @@ -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; diff --git a/d3_resources/SpectrumChartD3.js b/d3_resources/SpectrumChartD3.js index 77b28c6..02540a7 100644 --- a/d3_resources/SpectrumChartD3.js +++ b/d3_resources/SpectrumChartD3.js @@ -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)