Skip to content

Add insiderange to cartesian axes - #6735

Merged
archmoj merged 8 commits into
masterfrom
range-inside-ticklables
Oct 19, 2023
Merged

archmoj merged 8 commits into
masterfrom
range-inside-ticklables

Conversation

@archmoj

@archmoj archmoj commented Sep 26, 2023

Copy link
Copy Markdown
Contributor

This feature helps avoid overlap between desired range and inside tick labels of the counter axis.
@plotly/plotly_js

Comment thread src/plots/cartesian/layout_attributes.js Outdated
@stephprobst

stephprobst commented Sep 26, 2023 •

Copy link
Copy Markdown

Thanks for this PR @archmoj. Looks very good to me. Just a few questions to verify my understanding:

  • If the range attribute is provided, the insiderange attribute will be ignored?
  • The new insiderange attribute will work with the new autorange options (e.g. minallowed)?
  • On a chart with two y-axes. one left and one right, it won't be possible to use the insiderange on the left side and a normal range (overlapping with the labels) on the right side? This is probably not needed, but I just wanted to make sure I understand this correctly and will confirm with my users.

Comment thread src/plots/cartesian/axes.js
Comment thread src/plots/cartesian/axes.js
@archmoj

archmoj commented Oct 13, 2023

Copy link
Copy Markdown
Contributor Author

Thanks for this PR @archmoj. Looks very good to me. Just a few questions to verify my understanding:

  • If the range attribute is provided, the insiderange attribute will be ignored?

When range attribute is provided, the graph has a range and we use that. To declare insiderange, one could provide that and do not provide a range.

@archmoj

archmoj commented Oct 13, 2023

Copy link
Copy Markdown
Contributor Author
  • The new insiderange attribute will work with the new autorange options (e.g. minallowed)?
    When insiderange is provided. It is used as the default value for range.
    At this point (after 121a664) one have to provide both start and end points in insiderange.
    In future and in a separate PR we may support partial insiderange values (i.e. one end being null and set via autorange options).

@archmoj

archmoj commented Oct 13, 2023

Copy link
Copy Markdown
Contributor Author
  • On a chart with two y-axes. one left and one right, it won't be possible to use the insiderange on the left side and a normal range (overlapping with the labels) on the right side? This is probably not needed, but I just wanted to make sure I understand this correctly and will confirm with my users.

Not at the moment. It looks like an interesting feature to add.

@alexcjohnson alexcjohnson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💃 Looks great! All the behavior I see around relayout and such behaves just as I'd expect. Nice work 😎

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

Labels

feature something new

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants