-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathindex.js
57 lines (48 loc) · 1.46 KB
/
index.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
if (typeof window !== "undefined") {
window.React = require("react");
window.ReactDOM = require("react-dom");
require("amcharts3/amcharts/amcharts.js");
require("amcharts3/amcharts/serial.js");
require("amcharts3/amcharts/themes/light.js");
require("./amcharts3-react.js");
var component = window.AmCharts.React;
var factory = React.createFactory(component);
function AmCharts() {
console.warn("Using AmCharts is deprecated, instead use AmCharts.React");
return factory.apply(this, arguments);
}
AmCharts.React = component;
function define(obj, name) {
Object.defineProperty(obj, name, {
configurable: true,
enumerable: true,
get: function () {
return window.AmCharts[name];
},
set: function (v) {
window.AmCharts[name] = v;
}
});
}
define(AmCharts, "baseHref");
define(AmCharts, "bezierX");
define(AmCharts, "bezierY");
define(AmCharts, "charts");
define(AmCharts, "dayNames");
define(AmCharts, "monthNames");
define(AmCharts, "processDelay");
define(AmCharts, "shortDayNames");
define(AmCharts, "shortMonthNames");
define(AmCharts, "theme");
define(AmCharts, "useUTC");
define(AmCharts, "addInitHandler");
define(AmCharts, "addPrefix");
define(AmCharts, "clear");
define(AmCharts, "formatDate");
define(AmCharts, "formatNumber");
define(AmCharts, "makeChart");
define(AmCharts, "stringToDate");
module.exports = AmCharts;
} else {
module.exports = {};
}