-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
Copy pathcore.js
76 lines (63 loc) · 2.15 KB
/
core.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/**
* Copyright 2012-2016, Plotly, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
/*
* Export the plotly.js API methods.
*/
var Plotly = require('./plotly');
// package version injected by `npm run preprocess`
exports.version = '1.17.2';
// inject promise polyfill
require('es6-promise').polyfill();
// inject plot css
require('../build/plotcss');
// inject default MathJax config
require('./fonts/mathjax_config');
// plot api
exports.plot = Plotly.plot;
exports.newPlot = Plotly.newPlot;
exports.restyle = Plotly.restyle;
exports.relayout = Plotly.relayout;
exports.redraw = Plotly.redraw;
exports.update = Plotly.update;
exports.extendTraces = Plotly.extendTraces;
exports.prependTraces = Plotly.prependTraces;
exports.addTraces = Plotly.addTraces;
exports.deleteTraces = Plotly.deleteTraces;
exports.moveTraces = Plotly.moveTraces;
exports.purge = Plotly.purge;
exports.setPlotConfig = require('./plot_api/set_plot_config');
exports.register = require('./plot_api/register');
exports.toImage = require('./plot_api/to_image');
exports.downloadImage = require('./snapshot/download');
exports.validate = require('./plot_api/validate');
exports.addFrames = Plotly.addFrames;
exports.deleteFrames = Plotly.deleteFrames;
exports.animate = Plotly.animate;
// scatter is the only trace included by default
exports.register(require('./traces/scatter'));
// register all registrable components modules
exports.register([
require('./components/legend'),
require('./components/annotations'),
require('./components/shapes'),
require('./components/images'),
require('./components/updatemenus'),
require('./components/rangeslider'),
require('./components/rangeselector')
]);
// plot icons
exports.Icons = require('../build/ploticon');
// unofficial 'beta' plot methods, use at your own risk
exports.Plots = Plotly.Plots;
exports.Fx = Plotly.Fx;
exports.Snapshot = require('./snapshot');
exports.PlotSchema = require('./plot_api/plot_schema');
exports.Queue = require('./lib/queue');
// export d3 used in the bundle
exports.d3 = require('d3');