@@ -19,95 +19,67 @@ var extendFlat = require('../../lib/extend').extendFlat;
19
19
var attrs = {
20
20
x : {
21
21
valType : 'data_array' ,
22
- editType : 'calc' ,
23
- description : ''
22
+ role : 'info' ,
23
+ editType : 'calc+clearAxisTypes' ,
24
+ description : 'Sets the x coordinates of the vector field'
24
25
} ,
25
26
y : {
26
27
valType : 'data_array' ,
27
- editType : 'calc'
28
+ role : 'info' ,
29
+ editType : 'calc+clearAxisTypes' ,
30
+ description : 'Sets the y coordinates of the vector field'
28
31
} ,
29
32
z : {
30
33
valType : 'data_array' ,
31
- editType : 'calc'
34
+ role : 'info' ,
35
+ editType : 'calc+clearAxisTypes' ,
36
+ description : 'Sets the z coordinates of the vector field'
32
37
} ,
33
38
34
39
u : {
35
40
valType : 'data_array' ,
36
41
editType : 'calc' ,
37
- description : [
38
- ] . join ( ' ' )
42
+ description : 'Sets the x components of the vector field.'
39
43
} ,
40
44
v : {
41
45
valType : 'data_array' ,
42
46
editType : 'calc' ,
43
- description : [
44
- ] . join ( ' ' )
45
-
47
+ description : 'Sets the y components of the vector field.'
46
48
} ,
47
49
w : {
48
50
valType : 'data_array' ,
49
51
editType : 'calc' ,
50
- description : [
51
- ] . join ( ' ' )
52
-
53
- } ,
54
-
55
- cx : {
56
- valType : 'data_array' ,
57
- editType : 'calc+clearAxisTypes' ,
58
- description : [
59
- ] . join ( ' ' )
60
- } ,
61
- cy : {
62
- valType : 'data_array' ,
63
- editType : 'calc+clearAxisTypes' ,
64
- description : [
65
- ] . join ( ' ' )
66
- } ,
67
- cz : {
68
- valType : 'data_array' ,
69
- editType : 'calc+clearAxisTypes' ,
70
- description : [
71
- ] . join ( ' ' )
52
+ description : 'Sets the z components of the vector field.'
72
53
} ,
73
54
74
- bounds : {
55
+ startx : {
75
56
valType : 'data_array' ,
76
- editType : 'calc+clearAxisTypes' ,
77
- description : [
78
- ] . join ( ' ' )
79
- } ,
80
-
81
- colormap : {
82
- valType : 'string' ,
83
- role : 'style' ,
84
57
editType : 'calc' ,
85
58
description : [
59
+ 'Sets the x components of the starting position of the streamtubes' ,
60
+ ''
86
61
] . join ( ' ' )
87
62
} ,
88
-
89
- maxLength : {
90
- valType : 'number' ,
91
- min : 1 ,
92
- dflt : 1000 ,
63
+ starty : {
64
+ valType : 'data_array' ,
93
65
editType : 'calc' ,
94
66
description : [
67
+ 'Sets the y components of the starting position of the streamtubes' ,
68
+ ''
95
69
] . join ( ' ' )
96
70
} ,
97
-
98
- widthScale : {
99
- valType : 'number' ,
100
- role : 'style' ,
101
- min : 0 ,
102
- dflt : 100 ,
71
+ startz : {
72
+ valType : 'data_array' ,
103
73
editType : 'calc' ,
104
74
description : [
75
+ 'Sets the z components of the starting position of the streamtubes' ,
76
+ ''
105
77
] . join ( ' ' )
106
78
} ,
107
79
108
80
// TODO
109
- // sizemode: {},
110
- // sizescale: {},
81
+ // maxLength
82
+ // widthScale
111
83
112
84
text : {
113
85
valType : 'string' ,
@@ -116,22 +88,29 @@ var attrs = {
116
88
arrayOk : true ,
117
89
editType : 'calc' ,
118
90
description : [
119
-
91
+ 'Sets the text elements associated with the cones.' ,
92
+ 'If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,' ,
93
+ 'these elements will be seen in the hover labels.'
120
94
] . join ( ' ' )
121
95
}
122
96
} ;
123
97
124
- extendFlat ( attrs , colorAttrs ( '' , 'calc' , false ) , {
98
+ extendFlat ( attrs , colorAttrs ( '' , 'calc' , true ) , {
125
99
showscale : colorscaleAttrs . showscale ,
126
100
colorbar : colorbarAttrs
127
101
} ) ;
102
+ delete attrs . color ;
128
103
129
- var fromMesh3d = [ 'opacity' , 'flatshading' , 'lightposition' , 'lighting' ] ;
130
-
104
+ var fromMesh3d = [ 'opacity' , 'lightposition' , 'lighting' ] ;
131
105
fromMesh3d . forEach ( function ( k ) {
132
106
attrs [ k ] = mesh3dAttrs [ k ] ;
133
107
} ) ;
134
108
135
- attrs . hoverinfo = extendFlat ( { } , baseAttrs . hoverinfo , { editType : 'calc' } ) ;
109
+ // TODO maybe add divergence field?
110
+ attrs . hoverinfo = extendFlat ( { } , baseAttrs . hoverinfo , {
111
+ editType : 'calc' ,
112
+ flags : [ 'x' , 'y' , 'z' , 'u' , 'v' , 'w' , 'norm' , 'text' , 'name' ] ,
113
+ dflt : 'x+y+z+norm+text+name'
114
+ } ) ;
136
115
137
116
module . exports = attrs ;
0 commit comments