diff --git a/src/traces/parcats/parcats.js b/src/traces/parcats/parcats.js index 41b49adba10..538cd797f66 100644 --- a/src/traces/parcats/parcats.js +++ b/src/traces/parcats/parcats.js @@ -230,6 +230,8 @@ function performPlot(parcatsModels, graphDiv, layout, svg) { .attr('class', 'catlabel') .attr('pointer-events', 'none'); + var paperColor = graphDiv._fullLayout.paper_bgcolor; + // Update category label categorySelection.select('text.catlabel') .attr('text-anchor', @@ -245,10 +247,10 @@ function performPlot(parcatsModels, graphDiv, layout, svg) { .attr('alignment-baseline', 'middle') .style('text-shadow', - 'rgb(255, 255, 255) -1px 1px 2px, ' + - 'rgb(255, 255, 255) 1px 1px 2px, ' + - 'rgb(255, 255, 255) 1px -1px 2px, ' + - 'rgb(255, 255, 255) -1px -1px 2px') + paperColor + ' -1px 1px 2px, ' + + paperColor + ' 1px 1px 2px, ' + + paperColor + ' 1px -1px 2px, ' + + paperColor + ' -1px -1px 2px') .style('fill', 'rgb(0, 0, 0)') .attr('x', function(d) { diff --git a/test/image/baselines/parcats_dark.png b/test/image/baselines/parcats_dark.png new file mode 100644 index 00000000000..167fd3428d8 Binary files /dev/null and b/test/image/baselines/parcats_dark.png differ diff --git a/test/image/mocks/parcats_dark.json b/test/image/mocks/parcats_dark.json new file mode 100644 index 00000000000..1a6c50b8f84 --- /dev/null +++ b/test/image/mocks/parcats_dark.json @@ -0,0 +1,18 @@ +{ + "data": [ + {"type": "parcats", + "domain": {"x": [0.125, 0.625],"y": [0.25, 0.75]}, + "dimensions":[ + {"label": "One", "values": [1, 1, 2, 1, 2, 1, 1, 2, 1]}, + {"label": "Two", "values": ["A", "B", "A", "B", "C", "C", "A", "B", "C"]}, + {"label": "Three", "values": [11, 11, 11, 11, 11, 11, 11, 11, 11]}]} + ], + "layout": { + "paper_bgcolor": "black", + "font": {"color": "white"}, + "height": 602, + "width": 592, + "margin": { + "l": 40, "r": 40, "t": 50, "b": 40 + }} +}