-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
add 'width' to box and violin trace #3109
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
Changes from 30 commits
8f04d13
f76ca97
81cdbe9
5ef2eeb
1c6b26b
2d93a0e
1f9ced8
26f44c4
77b9c9d
243a369
eb5e9da
eea273b
408aacb
0555283
4eb8b44
44e0a88
f8b963b
54aa355
0d4239b
fa3a314
c63780f
c24330d
6e7883d
37786d6
45ae47d
8366c88
ce81377
8885b5e
57cc05a
fe3d7ed
44fa269
f5ba38c
34722d3
d1aed48
c70f7d5
0dea0e9
5e5f9ee
d04c60c
91497e5
657848f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
"data": [{ | ||
"type": "violin", | ||
"width": 0.315, | ||
"x": [0, 5, 7, 8], | ||
"points": "none", | ||
"side": "positive", | ||
"box": { | ||
"visible": false | ||
}, | ||
"boxpoints": false, | ||
"line": { | ||
"color": "black" | ||
}, | ||
"fillcolor": "#8dd3c7", | ||
"opacity": 0.6, | ||
"meanline": { | ||
"visible": false | ||
}, | ||
"y0": 0.0 | ||
}, { | ||
"type": "violin", | ||
"x": [0, 5, 7, 8], | ||
"points": "none", | ||
"side": "positive", | ||
"box": { | ||
"visible": false | ||
}, | ||
"boxpoints": false, | ||
"line": { | ||
"color": "black" | ||
}, | ||
"fillcolor": "#d3c78d", | ||
"opacity": 0.6, | ||
"meanline": { | ||
"visible": false | ||
}, | ||
"y0": 0.1 | ||
}, { | ||
"type": "box", | ||
"width": 0.5421, | ||
"x": [0, 5, 7, 8], | ||
"points": "none", | ||
"side": "positive", | ||
"box": { | ||
"visible": false | ||
}, | ||
"boxpoints": false, | ||
"line": { | ||
"color": "black" | ||
}, | ||
"fillcolor": "#c78dd3", | ||
"opacity": 0.6, | ||
"meanline": { | ||
"visible": false | ||
}, | ||
"y0": 0.2 | ||
}], | ||
"layout": { | ||
"title": "Joyplot - Violin with multiple widths", | ||
"xaxis": {"zeroline": false}, | ||
"violingap": 0 | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -533,7 +533,7 @@ describe('Test violin hover:', function() { | |
|
||
Plotly.plot(gd, fig).then(function() { | ||
mouseEvent('mousemove', 300, 250); | ||
assertViolinHoverLine([299.35, 250, 250, 250]); | ||
assertViolinHoverLine([178.67823028564453, 250, 80, 250]); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Kully do you know why this test had to be modified? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wasn't too sure to be honest. I ran the test a few times but there were only two values the assert was saying was valid, iirc. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Presumably it changed because autorange can shrink depending on |
||
}) | ||
.catch(failTest) | ||
.then(done); | ||
|
@@ -544,7 +544,7 @@ describe('Test violin hover:', function() { | |
|
||
Plotly.plot(gd, fig).then(function() { | ||
mouseEvent('mousemove', 200, 250); | ||
assertViolinHoverLine([200.65, 250, 250, 250]); | ||
assertViolinHoverLine([321.3217315673828, 250, 420, 250]); | ||
}) | ||
.catch(failTest) | ||
.then(done); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does anything break if we 🔪 the
else
entirely? Unnecessary attributes should simply not be included intraceOut
at all.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, the violins are not drawn properly: the outlines are filled with black ink