-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Ternary (and scatter) fill #462
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 all commits
aab9536
4df54d7
3bc66f0
92b04e1
9896d81
38af594
0865fb5
0b33f53
d68d95e
459ea51
aca5423
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 |
---|---|---|
|
@@ -152,18 +152,34 @@ module.exports = { | |
}, | ||
fill: { | ||
valType: 'enumerated', | ||
values: ['none', 'tozeroy', 'tozerox', 'tonexty', 'tonextx'], | ||
values: ['none', 'tozeroy', 'tozerox', 'tonexty', 'tonextx', 'toself', 'tonext'], | ||
dflt: 'none', | ||
role: 'style', | ||
description: [ | ||
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. would be a good time to add more info the 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. 👍 added. It takes a lot to describe this behavior... |
||
'Sets the area to fill with a solid color.', | ||
'Use with `fillcolor`.' | ||
'Use with `fillcolor` if not *none*.', | ||
'*tozerox* and *tozeroy* fill to x=0 and y=0 respectively.', | ||
'*tonextx* and *tonexty* fill between the endpoints of this', | ||
'trace and the endpoints of the trace before it, connecting those', | ||
'endpoints with straight lines (to make a stacked area graph);', | ||
'if there is no trace before it, they behave like *tozerox* and', | ||
'*tozeroy*.', | ||
'*toself* connects the endpoints of the trace (or each segment', | ||
'of the trace if it has gaps) into a closed shape.', | ||
'*tonext* fills the space between two traces if one completely', | ||
'encloses the other (eg consecutive contour lines), and behaves like', | ||
'*toself* if there is no trace before it. *tonext* should not be', | ||
'used if one trace does not enclose the other.' | ||
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. fantastic. |
||
].join(' ') | ||
}, | ||
fillcolor: { | ||
valType: 'color', | ||
role: 'style', | ||
description: 'Sets the fill color.' | ||
description: [ | ||
'Sets the fill color.', | ||
'Defaults to a half-transparent variant of the line color,', | ||
'marker color, or marker line color, whichever is available.' | ||
].join(' ') | ||
}, | ||
marker: { | ||
symbol: { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"data":[ | ||
{ | ||
"x": [1, 2, 3, 1, null, 4, 5, 6], | ||
"y": [2, 3, 2, 2, null, 3, 4, 3], | ||
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. great test mock. |
||
"fill": "tonext", | ||
"line":{"shape": "spline"} | ||
}, | ||
{ | ||
"x": [-1, 4, 9, null, 0, 1, 2], | ||
"y": [1, 6, 1, null, 5, 6, 5], | ||
"fill": "tonext" | ||
}, | ||
{ | ||
"x": [6, 7, 8], | ||
"y": [5, 6, 5], | ||
"fill": "toself" | ||
} | ||
], | ||
"layout":{ | ||
"title": "Fill toself and tonext", | ||
"width": 400, | ||
"height": 400 | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"data": [ | ||
{ | ||
"a": [0.4, 0.4, 0.2, 0.4], | ||
"b":[0.2, 0.4, 0.4, 0.2], | ||
"type": "scatterternary", | ||
"fill": "tonext" | ||
}, | ||
{ | ||
"a":[0.5, 0.5, 0, 0.5], | ||
"b":[0, 0.5, 0.5, 0], | ||
"type": "scatterternary", | ||
"fill": "tonext" | ||
}, | ||
{ | ||
"a": [0.8, 0.6, 0.6, 0.8, null, 0.1, 0.1, 0.3, 0.1, null, 0.1, 0.1, 0.3, 0.1], | ||
"b": [0.1, 0.1, 0.3, 0.1, null, 0.8, 0.6, 0.6, 0.8, null, 0.3, 0.1, 0.1, 0.3], | ||
"type": "scatterternary", | ||
"fill": "toself" | ||
} | ||
], | ||
"layout": { | ||
"height": 400, | ||
"width": 500 | ||
} | ||
} |
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.