Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Click-axis-to-reset-brush does not work with multi brush? #10

Closed
aravinda0 opened this issue May 16, 2018 · 11 comments
Closed

Click-axis-to-reset-brush does not work with multi brush? #10

aravinda0 opened this issue May 16, 2018 · 11 comments
Assignees

Comments

@aravinda0
Copy link

The multi brush feature works nicely, but in that mode it seems we can no longer click on the axis to clear the brushes.

In single-brush mode, it click-to-reset still works fine.

This can be seen in the included demo for multi-brushes.

@BigFatDog BigFatDog self-assigned this May 18, 2018
@aravinda0
Copy link
Author

Hey @BigFatDog, I know you must be busy with regular work, but is there a ballpark estimate for a fix for this?

@BigFatDog
Copy link
Owner

@ManiacalAce Thank you for your understanding.
In fact I've worked on this for two nights in the last week, but didn't solve this.

I want to fix this bug in the coming week.

@BigFatDog
Copy link
Owner

@ManiacalAce Done.
v2.0.6 has been released with the bug-fix.

@aravinda0
Copy link
Author

Nice!
Has this been published to npm? I still get 2.0.5 as latest from npm install.

@BigFatDog
Copy link
Owner

BigFatDog commented May 22, 2018

It seems there a problem with npm repo. I can see the versions are inconsistent

I've opened a ticket to npm team. I'll let you know when this is fixed.

@aravinda0
Copy link
Author

I got 2.0.7 now from npm, thanks.

The click-to-reset bug seems fixed, but there's a slightly unexpected behaviour.
If I click to reset and there's are no brushes left on any axes, all items get highlighted (as if there was a full-sized brush on every axis).

The old mode (1D-axes) still works as before. If I clear all brushes by clicking on axes, nothing is highlighted anymore.

@BigFatDog
Copy link
Owner

Are you using the brush.html for testing?

@BigFatDog
Copy link
Owner

@ManiacalAce I haven't got your idea yet.

When chart is loaded without any brush action, let's call this the initial state.

  • In 1D-axes mode: add a brush, click axis to reset brush of the axis, chart is restored to the initial state.
  • In 1D-axes-multi mode, add two brushes on one axis, click axis to reset brushes of the axis, chart is restored to the initial state, too.

Behaviors of click-to-reset feature are consistent in both 1D-axes mode and 1D-axes-multi mode.

From your description, I guess we may have different observations. Which demo page did you use?

@aravinda0
Copy link
Author

@BigFatDog Sorry for the delay. I'll get back to you with a concrete example in 5-6 hours. I wasn't using the included examples - I was basing it off of observations in my product where we use this lib.

The gist of it is that it seems like in multi mode, clicking to reset seems to select everything on the chart.

Let me re-verify and get back to you by evening.

@aravinda0
Copy link
Author

@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).

@BigFatDog
Copy link
Owner

The new bug that has been found by @ManiacalAce has been recorded in #13 After Click-to-Reset 1d-axes-multi brush, paths are rendered in brush color

This issue is closed because original bug has be resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants