Skip to content

Commit 95625a1

Browse files
committed
fixed pointcloud defaults (bug on master)
1 parent 4e74db1 commit 95625a1

File tree

2 files changed

+91
-0
lines changed

2 files changed

+91
-0
lines changed

src/traces/pointcloud/defaults.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor) {
2424
}
2525

2626
coerce('text');
27+
coerce('tooltip');
28+
coerce('tooltiptemplate');
2729
coerce('marker.color', defaultColor);
2830
coerce('marker.opacity');
2931
coerce('marker.blend');
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
{
2+
"data": [
3+
{
4+
"type": "pointcloud",
5+
"mode": "markers",
6+
"marker": {
7+
"sizemin": 0.5,
8+
"sizemax": 100,
9+
"arearatio": 0,
10+
"color": "rgba(255, 0, 0, 0.6)"
11+
},
12+
"x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
13+
"y": [9, 8, 7, 6, 5, 4, 3, 2, 1, 0],
14+
"tooltiptemplate": "x: %{x}<br>y: %{y}",
15+
"tooltip": {"arrowcolor": "blue"}
16+
},
17+
{
18+
"type": "pointcloud",
19+
"mode": "markers",
20+
"marker": {
21+
"sizemin": 0.5,
22+
"sizemax": 100,
23+
"arearatio": 0,
24+
"color": "rgba(0, 0, 255, 0.9)",
25+
"opacity": 0.8,
26+
"blend": true
27+
},
28+
"opacity": 0.7,
29+
"x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
30+
"y": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
31+
"tooltiptemplate": "x: %{x}<br>y: %{y}",
32+
"tooltip": {"arrowcolor": "blue"}
33+
},
34+
{
35+
"type": "pointcloud",
36+
"mode": "markers",
37+
"marker": {
38+
"sizemin": 0.5,
39+
"sizemax": 100,
40+
"border": {
41+
"color": "rgb(0, 0, 0)",
42+
"arearatio": 0.7071
43+
},
44+
"color": "green",
45+
"opacity": 0.8,
46+
"blend": true
47+
},
48+
"opacity": 0.7,
49+
"x": [3, 4.5, 6],
50+
"y": [9, 9, 9],
51+
"tooltiptemplate": "x: %{x}<br>y: %{y}",
52+
"tooltip": {"arrowcolor": "blue"}
53+
}
54+
],
55+
"layout": {
56+
"title": {"text": "Point Cloud - basic"},
57+
"xaxis": {
58+
"type": "linear",
59+
"range": [
60+
-2.501411175139456,
61+
43.340777299865266
62+
],
63+
"autorange": true
64+
},
65+
"yaxis": {
66+
"type": "linear",
67+
"range": [
68+
4,
69+
6
70+
],
71+
"autorange": true
72+
},
73+
"height": 598,
74+
"width": 1080,
75+
"autosize": true,
76+
"showlegend": false
77+
},
78+
"config": {
79+
"editable": true,
80+
"modeBarButtonsToAdd": [
81+
"tooltip",
82+
"hoverclosest",
83+
"hovercompare",
84+
"togglespikelines"
85+
],
86+
"displaylogo": false,
87+
"displayModeBar": true
88+
}
89+
}

0 commit comments

Comments
 (0)