9
9
'use strict' ;
10
10
11
11
/*
12
- * Export the plotly.js API methods.
13
- *
14
12
* This file is browserify'ed into a standalone 'Plotly' object.
15
- *
16
13
*/
17
14
18
- var Plotly = require ( './plotly ' ) ;
15
+ var Core = require ( './core ' ) ;
19
16
20
17
// package version injected by `npm run preprocess`
21
18
exports . version = '1.4.1' ;
22
19
23
- // plot api
24
- exports . plot = Plotly . plot ;
25
- exports . newPlot = Plotly . newPlot ;
26
- exports . restyle = Plotly . restyle ;
27
- exports . relayout = Plotly . relayout ;
28
- exports . redraw = Plotly . redraw ;
29
- exports . extendTraces = Plotly . extendTraces ;
30
- exports . prependTraces = Plotly . prependTraces ;
31
- exports . addTraces = Plotly . addTraces ;
32
- exports . deleteTraces = Plotly . deleteTraces ;
33
- exports . moveTraces = Plotly . moveTraces ;
34
- exports . setPlotConfig = require ( './plot_api/set_plot_config' ) ;
35
-
36
- // plot icons
37
- exports . Icons = require ( '../build/ploticon' ) ;
38
-
39
- // unofficial 'beta' plot methods, use at your own risk
40
- exports . Plots = Plotly . Plots ;
41
- exports . Fx = Plotly . Fx ;
42
- exports . Snapshot = Plotly . Snapshot ;
43
- exports . PlotSchema = Plotly . PlotSchema ;
44
- exports . Queue = Plotly . Queue ;
45
-
46
- // export d3 used in the bundle
47
- exports . d3 = require ( 'd3' ) ;
48
-
49
- Plotly . register ( [
20
+ // Load all trace modules
21
+ Core . register ( [
50
22
require ( './traces/bar' ) ,
51
23
require ( './traces/box' ) ,
52
24
require ( './traces/heatmap' ) ,
@@ -62,3 +34,5 @@ Plotly.register([
62
34
require ( './traces/choropleth' ) ,
63
35
require ( './traces/scattergl' )
64
36
] ) ;
37
+
38
+ module . exports = Core ;
0 commit comments