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

Appearance settings

Commit d233f3b

Browse filesBrowse files
committed
fix and 🔒 _extremes in polar tranformed traces
1 parent 33b4085 commit d233f3b
Copy full SHA for d233f3b

File tree

3 files changed

+80
-1
lines changed
Filter options

3 files changed

+80
-1
lines changed

‎src/plots/polar/layout_defaults.js

Copy file name to clipboardExpand all lines: src/plots/polar/layout_defaults.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function handleDefaults(contIn, contOut, coerce, opts) {
5555
// propagate the template.
5656
var axOut = contOut[axName] = {};
5757
axOut._id = axOut._name = axName;
58-
axOut._traceIndices = subplotData.map(function(t) { return t.index; });
58+
axOut._traceIndices = subplotData.map(function(t) { return t._expandedIndex; });
5959

6060
var dataAttr = constants.axisName2dataArray[axName];
6161
var axType = handleAxisTypeDefaults(axIn, axOut, coerceAxis, subplotData, dataAttr);
47.4 KB
Loading
+79Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"data": [{
3+
"type": "scatterpolar",
4+
"mode": "lines+markers",
5+
"r": [1, -1, -2, 0, 1, 3, 3],
6+
"theta": [2, 1, 0, 1, 3, 4, 3],
7+
"thetaunit": "radians",
8+
"transforms": [{
9+
"type": "groupby",
10+
"groups": ["a", "a", "b", "a", "b", "b", "a"],
11+
"styles": [
12+
{"target": "a", "value": {"marker": {"color": "orange"}}},
13+
{"target": "b", "value": {"marker": {"color": "blue"}}}
14+
]
15+
}, {
16+
"type": "filter",
17+
"target": "r",
18+
"operation": ">=",
19+
"value": 0,
20+
"preservegaps": true
21+
}],
22+
"name": "Groupby+filter"
23+
},
24+
{
25+
"type": "scatterpolar",
26+
"r": [1, 2, 3, 4, -3],
27+
"theta": [1.1, 2.2, 3.3, 4.4, 5.5],
28+
"thetaunit": "radians",
29+
"marker": {
30+
"size": [0.3, 0.2, 0.1, 0.4, 0.5],
31+
"sizeref": 0.01,
32+
"color": [2, 4, 6, 10, 8],
33+
"opacity": [0.9, 0.6, 0.2, 0.8, 1.0],
34+
"line": {
35+
"color": [2.2, 3.3, 4.4, 5.5, 1.1]
36+
}
37+
},
38+
"transforms": [{
39+
"type": "aggregate",
40+
"groups": ["a", "b", "a", "a", "a"],
41+
"aggregations": [
42+
{"target": "r", "func": "sum"},
43+
{"target": "theta", "func": "avg"},
44+
{"target": "marker.size", "func": "min"},
45+
{"target": "marker.color", "func": "max"},
46+
{"target": "marker.line.color", "func": "last"},
47+
{"target": "marker.line.width", "func": "count"}
48+
]
49+
}],
50+
"name": "Aggregate"
51+
},
52+
{
53+
"type": "scatterpolar",
54+
"r": [1, 2, 3, 4, 5, 6],
55+
"theta": [1, 4, 2, 6, 5, 3],
56+
"thetaunit": "radians",
57+
"transforms": [{
58+
"type": "sort",
59+
"target": [1, 6, 2, 5, 3, 4]
60+
}],
61+
"name": "Sort"
62+
},
63+
{
64+
"type": "scatterpolar",
65+
"r":[4, 5, 6, 4, 5, 6],
66+
"theta": [1, 1, 1, 2, 2, 2],
67+
"thetaunit": "radians",
68+
"marker": {"color": [1, 2, 3, -1, -2, -3], "size": 12},
69+
"mode": "lines+markers",
70+
"transforms": [
71+
{"type": "groupby", "groups": [1, 1, 1, 2, 2, 2]}
72+
]
73+
}],
74+
"layout": {
75+
"width": 600,
76+
"height": 400,
77+
"title": "Transforms on polar subplot"
78+
}
79+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.