-
Notifications
You must be signed in to change notification settings - Fork 356
/
Copy pathcore.js
122 lines (118 loc) · 3.1 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
/**
* Copyright (c) 2017 NAVER Corp.
* billboard.js project is licensed under the MIT license
*/
import * as d3 from "d3";
import Chart from "./internals/Chart";
import ChartInternal from "./internals/ChartInternal";
import Axis from "./axis/Axis";
import * as util from "./internals/util";
import "./scss/main.scss";
/**
* @namespace bb
* @version #__VERSION__#
*/
const bb = {
/**
* Version information
* @property {String} version version
* @example
* bb.version; // "1.0.0"
* @memberOf bb
*/
version: "#__VERSION__#",
/**
* generate charts
* @param {Options} options chart options
* @memberOf bb
* @return {Chart}
* @see {@link Options} for different generation options
* @see {@link Chart} for different methods API
* @example
* <!-- chart holder -->
* <div id="LineChart"></div>
* @example
* // generate chart with options
* var chart = bb.generate({
* "bindto": "#LineChart"
* "data": {
* "columns": [
* ["data1", 30, 200, 100, 400, 150, 250],
* ["data2", 50, 20, 10, 40, 15, 25]
* ]
* }
* });
*
* // call some API
* // ex) get the data of 'data1'
* chart.data("data1");
*/
generate(config) {
return new Chart(config);
},
chart: {
fn: Chart.prototype,
internal: {
fn: ChartInternal.prototype,
axis: {
fn: Axis.prototype
}
}
}
};
for (const p in util) {
!/^__/.test(p) && (ChartInternal.prototype[p] = util[p]);
}
require("./config/config.js");
require("./internals/scale.js");
require("./internals/domain.js");
require("./data/data.js");
require("./data/data.convert.js");
require("./data/data.load.js");
require("./internals/category.js");
require("./interactions/interaction.js");
require("./internals/size.js");
require("./shape/shape.js");
require("./shape/arc.js");
require("./shape/bar.js");
require("./shape/bubble.js");
require("./shape/line.js");
require("./shape/point.js");
require("./internals/text.js");
require("./internals/type.js");
require("./internals/grid.js");
require("./internals/tooltip.js");
require("./internals/legend.js");
require("./internals/title.js");
require("./internals/clip.js");
require("./internals/region.js");
require("./interactions/drag.js");
require("./internals/selection.js");
require("./interactions/subchart.js");
require("./interactions/zoom.js");
require("./internals/color.js");
require("./internals/format.js");
require("./internals/cache.js");
require("./internals/class.js");
require("./api/api.focus.js");
require("./api/api.show.js");
require("./api/api.zoom.js");
require("./api/api.load.js");
require("./api/api.flow.js");
require("./api/api.selection.js");
require("./api/api.transform.js");
require("./api/api.group.js");
require("./api/api.grid.js");
require("./api/api.region.js");
require("./api/api.data.js");
require("./api/api.category.js");
require("./api/api.color.js");
require("./api/api.x.js");
require("./api/api.axis.js");
require("./api/api.legend.js");
require("./api/api.chart.js");
require("./api/api.tooltip.js");
require("./axis/bb.axis.js");
require("./internals/ua.js");
require("./api/api.export.js");
export {bb, d3};