add option to ignore certain shapes when doing autosize
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.
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
@emilykl when you have a sec could you please let us know if this was closed by your earlier autosizing work? thanks - @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.
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 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.