|
| 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