BigFatDog/parcoords-es

After Click-to-Reset 1d-axes-multi brush, paths are rendered in brush color

Opened this issue · 1 comments

@ManiacalAce has discovered this bug in issue #10 Click-axis-to-reset-brush does not work with multi brush?

Thanks @ManiacalAce for the detailed descriptions, the bug is described as below:

@BigFatDog Seems like my issue stems from something else related to colors.

I was trying to have one color for regular, untouched stuff, and a different color for brushed items - which i could swear was possible in the original fork of this lib.

For example, If I have this (with color and brushedColor)

var pc = ParCoords({nullValueSeparator: "bottom"})("#example")
    .data([
        [0,-0,0,0,0,1],
        [1,-1,1,2,1,1],
        [2,,4,4,0.5,1],
        [3,,9,6,,],
        [4,-4,16,8,0.25,1]
    ])
    .color('#0000ff')
    .render()
    .shadows()
    .createAxes()
    .reorderable()
    .brushMode("1D-axes-multi")
    .brushedColor('#ff0000')

Initially, the lines are blue, as expected. Then when I brush some items, they become red. Then, when I click to reset, everything is red (when I expect it to be blue).

I observe similar behavior when enabling shadows. When the viz is first displayed there is nothing brushed but the foreground is painted with the shadow color.

It seems to be related to whether or not the most recent method call on the parcoods instance was .shadows() or .brushMode(...).

Maybe this is a useful clue as to what might be going on? A leak in canvas drawing state?