Skip to content

Commit f65a4db

Browse files
committed
fixed funnel defaults
1 parent 3416d50 commit f65a4db

File tree

2 files changed

+86
-0
lines changed

2 files changed

+86
-0
lines changed

src/traces/funnel/defaults.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
3333
coerce('hovertext');
3434
coerce('hovertemplate');
3535

36+
coerce('tooltip');
37+
coerce('tooltiptemplate');
38+
3639
var textposition = coerce('textposition');
3740
handleText(traceIn, traceOut, layout, coerce, textposition, {
3841
moduleHasSelected: false,
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
"data": [
3+
{
4+
"name": "plotly.js",
5+
"type": "funnel",
6+
"orientation": "h",
7+
"y": [
8+
"All tickets",
9+
"Pull requests",
10+
"Author: etpinard",
11+
"Label: bug",
12+
"Status: open"
13+
],
14+
"x": [
15+
3756,
16+
1580,
17+
663,
18+
343,
19+
1
20+
],
21+
"textposition": "inside",
22+
"insidetextanchor": "start",
23+
"textinfo": "value+percent initial",
24+
"tooltiptemplate": "%{fullData.name}<br>%{x}<br>y: %{y}",
25+
"tooltip": {"arrowcolor": "blue"}
26+
},
27+
{
28+
"name": "orca",
29+
"type": "funnel",
30+
"orientation": "h",
31+
"y": [
32+
"All tickets",
33+
"Pull requests",
34+
"Author: etpinard",
35+
"Label: bug",
36+
"Status: open"
37+
],
38+
"x": [
39+
224,
40+
107,
41+
31,
42+
2,
43+
0
44+
],
45+
"textposition": "outside",
46+
"textinfo": "label+value",
47+
"marker": {
48+
"line": {
49+
"color": "rgb(255, 0, 0)",
50+
"width": 2
51+
}
52+
},
53+
"tooltiptemplate": "%{fullData.name}<br>%{x}<br>y: %{y}",
54+
"tooltip": {"arrowcolor": "blue"}
55+
}
56+
],
57+
"layout": {
58+
"font": {
59+
"textcase": "word caps",
60+
"lineposition": "under",
61+
"shadow": "auto"
62+
},
63+
"title": {
64+
"text": "plotly repos | April 10 2019"
65+
},
66+
"margin": { "l": 150 },
67+
"height": 800,
68+
"width": 800,
69+
"funnelmode": "group",
70+
"showlegend": true
71+
},
72+
"config": {
73+
"editable": true,
74+
"modeBarButtonsToAdd": [
75+
"tooltip",
76+
"hoverclosest",
77+
"hovercompare",
78+
"togglespikelines"
79+
],
80+
"displaylogo": false,
81+
"displayModeBar": true
82+
}
83+
}

0 commit comments

Comments
 (0)