plotly.js icon indicating copy to clipboard operation
plotly.js copied to clipboard

add option to ignore certain shapes when doing autosize

Open mitja-p opened this issue 6 years ago • 4 comments

In some cases it is useful to ignore some shapes when auto sizing as they might stretch beyond current range on purpose or we do not even care where they are. By adding an option autorange (default: true), we can individually remove some shapes from auto sizing algorithm.

mitja-p avatar Nov 19 '19 15:11 mitja-p

This pull request has been sitting for a while, so I would like to close it as part of our effort to tidy up our public repositories. I've assigned it to myself to keep track of it; I'll wait until 2024-06-17 for someone to say it's still relevant and they'll to take it on, and otherwise I will close it then. Thanks - @gvwilson

gvwilson avatar Jun 10 '24 17:06 gvwilson

@emilykl when you have a sec could you please let us know if this was closed by your earlier autosizing work? thanks - @gvwilson

gvwilson avatar Aug 21 '24 15:08 gvwilson

Hi @mitja-p, thank you very much for the contribution.

If I understand correctly, the intention is for the chart developer to be able to specify certain shapes to exclude from axis autorange calculations, is that right?

If so I don't believe this change will have the desired effect. If you want to add a new shape attribute (something like autorangeignore) it should be added in src/components/shapes/attributes.js.

Feel free to also share a code example demonstrating the desired outcome.

emilykl avatar Sep 27 '24 17:09 emilykl

Yes, that is right. I forgot the exact purpuse, but I think it was for helper lines that should be ignored when doing auto range as they are visual aid and not a thing that needs to be fully visible.

mitja-p avatar Sep 30 '24 05:09 mitja-p

@mitja-p I'm going to close this PR for the moment since more work is needed — please feel free to reopen at any point if/when you have the chance to continue working on it. Thank you for your interest in contributing to Plotly.js!

If you prefer, you can also open a feature request issue describing the behavior you'd like to see, and we or a community member will get to it when we can.

emilykl avatar Oct 14 '25 20:10 emilykl