forked from nhn/tui.chart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample15-01-bullet-chart-basic.html
112 lines (106 loc) · 3.38 KB
/
example15-01-bullet-chart-basic.html
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
<!DOCTYPE html>
<html>
<head lang='kr'>
<meta charset='UTF-8'>
<meta http-equiv='X-UA-Compatible' content='IE=Edge'/>
<title>[Bullet Chart] basic</title>
<link rel='stylesheet' type='text/css' href='../dist/tui-chart.css'/>
<link rel='stylesheet' type='text/css' href='../node_modules/codemirror/lib/codemirror.css'/>
<link rel='stylesheet' type='text/css' href='../node_modules/codemirror/addon/lint/lint.css'/>
<link rel='stylesheet' type='text/css' href='./css/example.css'/>
</head>
<body>
<div class='wrap'>
<div id='code-html'>
<div id='chart-area'></div>
</div>
</div>
<div class='custom-area'>
<div id='error-dim'>
<span id='error-text'></span>
<div id='error-stack'></div>
<span id='go-to-dev-tool'>For more detail, open browser's developer tool and check it out.</span>
</div>
<div style='border: 0.2px solid #aaa;'>
<textarea id='code'></textarea>
</div>
<div class='apply-btn-area' style='width: 600px;'>
<button class="btn" style='position: absolute; right: 0px;'
onclick='evaluationCode(chartCM, codeString);'>Run it!
</button>
<button class="btn" onclick="window.open('https://github.com/nhnent/tui.chart/wiki/theme')">More Theme
</button>
</div>
</div>
<!--Import chart.js and dependencies-->
<script type='text/javascript' src='https://rawgit.com/nhnent/tui.code-snippet/v1.3.0/dist/tui-code-snippet.js'></script>
<script type='text/javascript' src='https://rawgit.com/nhnent/raphael/v2.2.0b/raphael.js'></script>
<script src='../dist/tui-chart.js'></script>
<script class='code-js' id='code-js'>
var container = document.getElementById('chart-area');
var data = {
categories: ['July', 'August'],
series: [{
name: 'Budget',
data: 25,
markers: [28, 2, 15],
ranges: [[-1, 10], [10, 20], [20, 30]]
}, {
name: 'Hello',
data: 11,
markers: [20],
ranges: [[0, 8], [8, 15]]
}, {
name: 'World',
data: 30,
markers: [25],
ranges: [[0, 10], [10, 19], [19, 28]]
}, {
name: 'Income',
data: 23,
markers: [],
ranges: [[19, 25], [13, 19], [0, 13]]
}]
};
var options = {
chart: {
width: 1160,
height: 500,
title: 'Monthly Revenue',
format: '1,000'
},
legend: {
visible: true
},
xAxis: {
max: 35
},
series: {
showLabel: true,
vertical: false
}
};
var theme = {
series: {
ranges: [{ color: 'gray', opacity: 0.7 },
null,
{ color: 'purple' }
]
}
};
// For apply theme
tui.chart.registerTheme('myTheme', theme);
options.theme = 'myTheme';
tui.chart.bulletChart(container, data, options);
</script>
<!--For tutorial page-->
<script src='../node_modules/codemirror/lib/codemirror.js'></script>
<script src='//ajax.aspnetcdn.com/ajax/jshint/r07/jshint.js'></script>
<script src='../node_modules/codemirror/addon/edit/matchbrackets.js'></script>
<script src='../node_modules/codemirror/addon/selection/active-line.js'></script>
<script src='../node_modules/codemirror/mode/javascript/javascript.js'></script>
<script src='../node_modules/codemirror/addon/lint/lint.js'></script>
<script src='../node_modules/codemirror/addon/lint/javascript-lint.js'></script>
<script src='./js/example.js'></script>
</body>
</html>