8
8
9
9
'use strict' ;
10
10
11
- var Plots = require ( '../../plots/plots' ) ;
12
-
13
11
var Box = { } ;
14
12
15
- Plots . register ( Box , 'box' ,
16
- [ 'cartesian' , 'symbols' , 'oriented' , 'box' , 'showLegend' ] , {
17
- description : [
18
- 'In vertical (horizontal) box plots,' ,
19
- 'statistics are computed using `y` (`x`) values.' ,
20
- 'By supplying an `x` (`y`) array, one box per distinct x (y) value' ,
21
- 'is drawn' ,
22
- 'If no `x` (`y`) {array} is provided, a single box is drawn.' ,
23
- 'That box position is then positioned with' ,
24
- 'with `name` or with `x0` (`y0`) if provided.' ,
25
- 'Each box spans from quartile 1 (Q1) to quartile 3 (Q3).' ,
26
- 'The second quartile (Q2) is marked by a line inside the box.' ,
27
- 'By default, the whiskers correspond to the box\' edges' ,
28
- '+/- 1.5 times the interquartile range (IQR = Q3-Q1),' ,
29
- 'see *boxpoints* for other options.'
30
- ] . join ( ' ' )
31
- }
32
- ) ;
33
-
34
13
Box . attributes = require ( './attributes' ) ;
35
14
Box . layoutAttributes = require ( './layout_attributes' ) ;
36
15
Box . supplyDefaults = require ( './defaults' ) ;
@@ -41,4 +20,23 @@ Box.plot = require('./plot');
41
20
Box . style = require ( './style' ) ;
42
21
Box . hoverPoints = require ( './hover' ) ;
43
22
23
+ Box . _type = 'box' ;
24
+ Box . _categories = [ 'cartesian' , 'symbols' , 'oriented' , 'box' , 'showLegend' ] ;
25
+ Box . _meta = {
26
+ description : [
27
+ 'In vertical (horizontal) box plots,' ,
28
+ 'statistics are computed using `y` (`x`) values.' ,
29
+ 'By supplying an `x` (`y`) array, one box per distinct x (y) value' ,
30
+ 'is drawn' ,
31
+ 'If no `x` (`y`) {array} is provided, a single box is drawn.' ,
32
+ 'That box position is then positioned with' ,
33
+ 'with `name` or with `x0` (`y0`) if provided.' ,
34
+ 'Each box spans from quartile 1 (Q1) to quartile 3 (Q3).' ,
35
+ 'The second quartile (Q2) is marked by a line inside the box.' ,
36
+ 'By default, the whiskers correspond to the box\' edges' ,
37
+ '+/- 1.5 times the interquartile range (IQR = Q3-Q1),' ,
38
+ 'see *boxpoints* for other options.'
39
+ ] . join ( ' ' )
40
+ } ;
41
+
44
42
module . exports = Box ;
0 commit comments