99
1010'use strict' ;
1111
12- var Plotly = require ( '../../plotly ' ) ;
12+ var Plots = require ( '../../plots/plots ' ) ;
1313
1414/**
1515 * Histogram has its own attribute, defaults and calc steps,
@@ -24,35 +24,30 @@ var Plotly = require('../../plotly');
2424 * to allow quadrature combination of errors in summed histograms...
2525 */
2626
27- Plotly . Plots . register ( exports , 'histogram' ,
27+
28+ var Histogram = { } ;
29+
30+ Plots . register ( Histogram , 'histogram' ,
2831 [ 'cartesian' , 'bar' , 'histogram' , 'oriented' , 'errorBarsOK' , 'showLegend' ] , {
2932 description : [
3033 'The sample data from which statistics are computed is set in `x`' ,
3134 'for vertically spanning histograms and' ,
3235 'in `y` for horizontally spanning histograms.' ,
33-
3436 'Binning options are set `xbins` and `ybins` respectively' ,
3537 'if no aggregation data is provided.'
3638 ] . join ( ' ' )
3739 }
3840) ;
3941
40- exports . attributes = require ( './attributes' ) ;
41-
42- exports . layoutAttributes = require ( '../bar/layout_attributes' ) ;
43-
44- exports . supplyDefaults = require ( './defaults' ) ;
45-
46- exports . supplyLayoutDefaults = require ( '../bar/layout_defaults' ) ;
47-
48- exports . calc = require ( './calc' ) ;
49-
50- exports . setPositions = require ( '../bar/set_positions' ) ;
51-
52- exports . plot = require ( '../bar/plot' ) ;
53-
54- exports . style = require ( '../bar/style' ) ;
55-
56- exports . colorbar = require ( '../scatter/colorbar' ) ;
57-
58- exports . hoverPoints = require ( '../bar/hover' ) ;
42+ Histogram . attributes = require ( './attributes' ) ;
43+ Histogram . layoutAttributes = require ( '../bar/layout_attributes' ) ;
44+ Histogram . supplyDefaults = require ( './defaults' ) ;
45+ Histogram . supplyLayoutDefaults = require ( '../bar/layout_defaults' ) ;
46+ Histogram . calc = require ( './calc' ) ;
47+ Histogram . setPositions = require ( '../bar/set_positions' ) ;
48+ Histogram . plot = require ( '../bar/plot' ) ;
49+ Histogram . style = require ( '../bar/style' ) ;
50+ Histogram . colorbar = require ( '../scatter/colorbar' ) ;
51+ Histogram . hoverPoints = require ( '../bar/hover' ) ;
52+
53+ module . exports = Histogram ;
0 commit comments