Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add shapes.layer "between" for drawing between gridlines and traces #6927

Merged
merged 13 commits into from
Mar 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Test more cases in shapes_layer_below_traces mock
- added axis y2 to test interaction between axes
- added shape label
- moved dashdot line to see more of its interaction with the gridlines
- removed transparency for easier visual checking
  • Loading branch information
my-tien committed Mar 25, 2024
commit ff7ca7a73a7f016a5cabee97c33b216ed68ff007
27 changes: 18 additions & 9 deletions test/image/mocks/zz-shapes_layer_below_traces.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,23 @@
35,
55
],
"type": "bar"
"type": "bar",
"yaxis":"y2"
}
],
"layout": {
"shapes": [
{
"name": "dashdot line",
"fillcolor": "rgba(179,179,179,0.6)",
"fillcolor": "rgba(179,179,179,1)",
"layer": "above",
"line": {
"color": "rgba(66,127,109,0.6)",
"color": "rgba(66,127,109,1)",
"dash": "dashdot"
},
"type": "line",
"x0": 0.75,
"x1": 0.75,
"x0": 0.4,
"x1": 0.4,
"xref": "x",
"y0": 0.0,
"y1": 1.0,
Expand All @@ -72,17 +73,20 @@
},
{
"name": "blue rect",
"fillcolor": "rgba(108,173,225,0.8)",
"fillcolor": "rgba(108,173,225,1)",
"layer": "between",
"label": {
"text": "hello, I am between gridlines and traces!"
},
"line": {
"color": "rgba(108,173,225,0.8)"
"color": "rgba(108,173,225,1)"
},
"type": "rect",
"x0": "B",
"x1": "D",
"xref": "x",
"y0": 40,
"y1": 70.0
"y0": 35,
"y1": 65.0
},
{
"name": "big rect",
Expand Down Expand Up @@ -121,6 +125,11 @@
"215"
],
"type": "linear"
},
"yaxis2": {
"side": "right",
"overlaying": "y"
}

}
}