Skip to content

Axis rescaled when legend item visibility changed [FEATURE] #9144

@MikeWoodward

Description

@MikeWoodward

Currently, if legend click_policy = "hide" the legend item is hidden but the axes are not rescaled. This is fine most of the time, but there are circumstances where you'd like the axes to be rescaled, for example, if the hidden item (e.g. line) is much greater than the other items.

Here's a view of the current behavior. Chart 1 shows the full chart, chart 2 shows what's shown when Y3 is hidden.

Chart 1
bokeh_plot (1)

Chart 2
bokeh_plot (2)

Here's what I would like to happen if the appropriate setting is made:
Chart 3
bokeh_plot (3)

I don't think this should be the default behavior. I suggest a new attribute something like: hide_rescale which is False by default (current behavior). If hide_rescale is set to True, the chart axes would be rescaled.

This has been discussed on the Discourse group: https://discourse.bokeh.org/t/bokeh-update-zoom-plot-or-axis-rescaling-when-hide-series-on-legend/2708/4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions