Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

RangeSlider: out-of-range labels #517

Closed
TahiriNadia opened this issue Apr 10, 2019 · 3 comments · Fixed by #695
Closed

RangeSlider: out-of-range labels #517

TahiriNadia opened this issue Apr 10, 2019 · 3 comments · Fixed by #695
Assignees
Labels
dash-type-bug Something isn't working as intended size: 2
Milestone

Comments

@TahiriNadia
Copy link
Contributor

if you put labels outside the slider range, they are still drawn, but they shouldn’t be
see here FYI plotly/dashR#80 (comment)

Example:

dccRangeSlider(
    marks=as.list(setNames(c(paste("Label", -5:6)), -5:6)),
    min=-5,
    max=6,
    value=list(-3, 4)
)

Screen Shot 2019-04-10 at 10 28 23 AM

@TahiriNadia TahiriNadia changed the title out-of-range labels out-of-range labels (dashR) Apr 10, 2019
@alexcjohnson
Copy link
Collaborator

Ah, the fact that the labels in that image overlap the box they're in seems like a bad thing. But what bothered me more in that dashR discussion was what you originally had - if your range is -5 to 6 and you have labels at values beyond 6:

Code:

library(dashCoreComponents)

dccRangeSlider(
    marks=c(paste("Label", -5:6)),
    min=-5,
    max=6,
    value=list(-3, 4)
)

Result:

Screen Shot 2019-04-08 at 1 37 07 PM

In that image, "Label 1" is at a value of 6, and that should be the last one drawn. The rest should (I think) simply be ignored, rather than get drawn at inaccessible locations. The alternative would be to automatically extend the range to include all defined labels, but I feel like there's a use case for "here are all the possible labels" and sometimes restricting the range to a subset of that without needing to also filter the labels.

@TahiriNadia TahiriNadia self-assigned this Apr 12, 2019
@alexcjohnson
Copy link
Collaborator

@TahiriNadia was this closed on purpose?

@TahiriNadia TahiriNadia reopened this Apr 12, 2019
@TahiriNadia
Copy link
Contributor Author

I'm thinking it was done? But it's not the case, I reopen it. Thank you @alexcjohnson for this comment.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dash-type-bug Something isn't working as intended size: 2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants