Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Propertyzerolinelayer for cartesian axes#7269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
gvwilson merged 7 commits intoplotly:masterfrommy-tien:zeroline-layer
May 8, 2025

Conversation

@my-tien
Copy link
Contributor

@my-tienmy-tien commentedNov 13, 2024
edited
Loading

Adds a new propertyzerolinelayer to cartesian axes to allow drawing the zeroline above traces.

This addresses the issue that sometimes the zeroline can be barely visible:
image

When setting the new propertyyaxis.zerolinelayer = "above traces":
image

DisclaimerI am required to add that…

the software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. in no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

@my-tienmy-tien changed the titleNew axis propzerolinelayer with values "below traces" (default) and "above traces"Propertyzerolinelayer for cartesian axesNov 13, 2024
@gvwilsongvwilson self-assigned thisNov 13, 2024
@gvwilsongvwilson added featuresomething new communitycommunity contribution labelsNov 13, 2024
@my-tien
Copy link
ContributorAuthor

@gvwilson Do you have a means to trigger the CI again? It seems that this run had a connection error on launch.

@gvwilson
Copy link
Contributor

@my-tien I just re-ran CI - hope that helps.

my-tien reacted with heart emoji

@gvwilsongvwilson added the cscustomer success labelNov 21, 2024
@stephprobst
Copy link

stephprobst commentedFeb 3, 2025
edited
Loading

Hi@gvwilson - Could this PR be reviewed and possibly merged soon? It seems like a reasonably sized change, that should be easy to integrate? Thank you for considering!

@gvwilsongvwilson added the P1needed for current cycle labelFeb 3, 2025
@gvwilsongvwilson assignedemilykl and unassignedgvwilsonFeb 4, 2025
varshowZeroLine=coerce('zeroline',opts.showGrid||!!zeroLineColor||!!zeroLineWidth);

if(!showZeroLine){
deletecontainerOut.zerolineLayer;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
deletecontainerOut.zerolineLayer;
deletecontainerOut.zerolinelayer;

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Thx for spotting! Fixed. Btw. did you just see this or is there another trick to catch this mistake?

@emilykl
Copy link
Contributor

emilykl commentedFeb 11, 2025
edited
Loading

@my-tien Thank you for the contribution!

This is looking good to me -- however I've noticed thatzerolinelayer doesn't seem to play nicely with thezorder property -- when a trace on a plot haszorder set, the traces are rendered above the zerolines, even ifzerolinelayer is set toabove traces. I've included an example below.

How big of a problem is that on your side? We are open to simply documenting the limitation but want to verify whether it will cause issues for you.

Mock:

Details
{    "data": [        {            "type": "bar",            "x": [-1, 0, 2, 3],            "y": [-1, 2, -3, 4],            "name": "xy",            "zorder": 2        },        {            "line": {                "width": 10            },            "mode": "lines",            "x": [-1, 0, 2, 3],            "y": [-3, 1, -1, 2],            "xaxis": "x2",            "yaxis": "y2",            "name": "x2y2"        }    ],    "layout": {        "title": {            "text": "Zerolines should be above traces<br>but they are rendered below"        },        "width": 600,        "height": 400,        "xaxis": {            "showline": true,            "zeroline": true,            "zerolinewidth": 5,            "zerolinecolor": "pink",            "zerolinelayer": "above traces"        },        "xaxis2": {            "showline": true,            "overlaying": "x",            "zeroline": true,            "zerolinewidth": 5,            "zerolinecolor": "pink",            "zerolinelayer": "above traces",            "side": "top"        },        "yaxis": {            "showline": true,            "zeroline": true,            "zerolinewidth": 5,            "zerolinecolor": "black",            "zerolinelayer": "above traces",            "range": [-1, 4]        },        "yaxis2": {            "showline": true,            "zeroline": true,            "zerolinewidth": 5,            "zerolinecolor": "black",            "zerolinelayer": "above traces",            "range": [-3, 2],            "overlaying": "y",            "side": "right"        }    }}

Image:

Screen Shot 2025-02-11 at 3 34 40 PM

@my-tien
Copy link
ContributorAuthor

Hi Emily, thanks for the heads up.

I didn't dig into the zorder logic much, but I assume to make it work with it, the zeroline drawing would have to be moved to another location? So it sounds like it could become a major change (correct me if I'm wrong).

In any case, from our side it's okay to document the limitation. – I've added a note to the description of the property.

@my-tien
Copy link
ContributorAuthor

Hey guys, I assume the failing tests are unrelated to the changes in the PR, can you verify?

@gvwilson
Copy link
Contributor

cc@emilykl to confirm that the failing tests aren't related to the changes in this PR - thanks

@stephprobst
Copy link

Hi@emilykl ,@gvwilson,

just following up on some old PRs. This seems to be good to go and only needs to be merged (after checking, that the failing tests are not related to the PR). Could you please have a look?

Thank you!

@gvwilsongvwilson merged commitccd68c6 intoplotly:masterMay 8, 2025
1 check failed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@emilyklemilyklAwaiting requested review from emilykl

1 more reviewer

@gvwilsongvwilsongvwilson approved these changes

Reviewers whose approvals may not affect merge requirements

Labels

communitycommunity contributioncscustomer successfeaturesomething newP1needed for current cycle

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@my-tien@gvwilson@stephprobst@emilykl@LiamConnors

[8]ページ先頭

©2009-2025 Movatter.jp