Skip to content

Update y-axis range when x-axis rangeslider is used #912

Description

@wave-electron

This is what currently happens with Plotly when using the range slider. If a short interval x-axis range from the slider is selected, the displayed trace(s) could become quasi flat:

problem

This occurs because the y-axis range is not updating when using the range slider. IMHO this seems to defeat the point of having a range slider.

Others have already realised this and have implemented a solution in the JS version of Plotly.

Javascript solution

To achieve updating y axis range, it listens to plotly_relayout event, use it's eventdata (xaxis.range) to filter the data, and redraw the plot with filtered data.

The only remaining issue is that the range slider y axis changes and therefore does not display the traces in full.

Is this feature something that could be easily implemented in the R version?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions