-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathscatter.html
More file actions
255 lines (227 loc) · 8.96 KB
/
scatter.html
File metadata and controls
255 lines (227 loc) · 8.96 KB
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SSART</title>
<!-- Favicon-->
<link rel="icon" type="image/x-icon" href="/src/ico/ssart_ico.ico" />
<!-- Bootstrap icons-->
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.4.1/font/bootstrap-icons.css" rel="stylesheet" />
<!-- Core theme CSS (includes Bootstrap)-->
<link href="/src/css/intro_styles.css" rel="stylesheet" />
<link href="/src/css/index.css" rel="stylesheet" />
<link href="/src/css/document.css" rel="stylesheet" />
<!-- <script src='https://d3js.org/d3.v5.min.js'></script> -->
<style>
body {
margin: 0;
background: #f8f8f8;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
width: 12%;
background-color: #f1f1f1;
position: fixed;
height: 100%;
overflow: auto;
}
li a {
display: block;
color: #000;
padding: 10px;
text-decoration: none;
height: 70px;
text-align: center;
line-height: 35px;
}
li a.active {
background-color: #555;
color: white;
}
li a:hover:not(.active) {
background-color: #555;
color: white;
}
#navHome {
height: 56px;
}
</style>
</head>
<body>
<ul>
<li><a id="navHome" class="active" href="index.html"><i class="bi bi-house-door"> HOME</i></a></div></li>
<li><a href="./bar.html">Bar Chart 1</a></li>
<li><a href="./barH.html">Bar Chart 2</a></li>
<li><a href="./line.html">Line Chart</a></li>
<li><a href="./area.html">Area Chart</a></li>
<li><a href="./scatter.html">Scatter Chart</a></li>
<li><a href="./bubble.html">Bubble Chart</a></li>
<li><a href="./circle.html">Circle Chart</a></li>
<li><a href="./radar.html">Radar Chart</a></li>
<li><a href="./polar.html">Polar Chart</a></li>
</ul>
<nav class="sb-topnav navbar navbar-expand navbar-dark bg-dark">
<!-- Navbar Brand-->
<a class="navbar-brand ps-3" href="index.html">SSART HOME</a>
<!-- Sidebar Toggle-->
<div><button class="btn btn-link btn-sm order-1 order-lg-0 me-4 me-lg-0" id="sidebarToggle" href="#!"><i class="fas fa-bars"></i></button>
<!-- Navbar Search-->
<form class="d-none d-md-inline-block form-inline ms-auto me-0 me-md-3 my-2 my-md-0">
<div class="input-group">
<input class="form-control" type="text" placeholder="Search for..." aria-label="Search for..." aria-describedby="btnNavbarSearch" />
<button class="btn btn-primary" id="btnNavbarSearch" type="button"><i class="bi bi-search"></i></button>
</div>
</form>
</nav>
<div>
<main>
<div class="container px-5 my-5">
<div class="container-fluid px-5">
<h1> ScatterChart (산점도 차트)</h1>
<br>
<hr>
<div class="chart-text">
<h4>Description</h4>
<br>
<p>This chart is a type of plot or mathematical diagram using coordinates to display values for typically two variables for a set of data. </p>
<p>The data are displayed as a collection of points on the horizontal axis and the vertical axis.</p>
<p>산점도 차트(Scatter chart)는 직교 좌표계 (도표) 를 이용해 좌표상의 점을 표시함으로써 두 개 변수간의 관계를 나타내는 방법입니다.</p>
<p>두 변수 사이의 관계를 알 수 있습니다.</p>
</div>
<hr>
<h4>Example</h4>
<img src="ssart-micro-site\src\img\IndexImg\5.Scatter.png"; width="400px" , height="400px"/>
<hr>
<details>
<summary>Try It</summary>
<pre style="color: #000">
<span class="script-color1">const</span> data = {
labels: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
datasets: [
{
label: 'Fully Rounded',
data: [
{ name: 1, value: 10 },
{ name: 2, value: 29 },
{ name: 3, value: 32 },
{ name: 4, value: 25 },
{ name: 5, value: 23 },
{ name: 10, value: 15 }
],
backgroundColor: "red",
},
{
label: 'Small Radius',
data: [1, 3, 3, 4, 5, 6, 7, 8, 9, 10]
,
backgroundColor: "blue",
},
{
label: 'Small Radius',
data:
[
[1.5, 1], [2, 2], [3, 2], [4, 2], [5, 2], [6, 2]
],
},
{
label: 'Small Radius',
data: [
{ x: 1, y: 15 },
{ x: 2, y: 23 },
{ x: 3, y: 25 },
{ x: 4, y: 32 },
{ x: 5, y: 29 },
{ x: -6, y: 13 },
{ x: 7, y: 15 },
],
}
]
};
<span class="script-color1">const</span> config = {
type: 'scatter',
width: 500,
height: 500,
margin: { top: 40, left: 40, bottom: 40, right: 40 },
padding: 0.1,
data: data,
options: {
responsive: true,
plugins: {
legend: {
position: 'right',<span class="annotation">// top bottom left right</span>
},
title: {
display: true,
text: 'Scatter Chart'
},
xTitle: {
display: true,
text: 'y'
},
yTitle: {
display: true,
text: 'x'
},
xGrid: {
color: "#323233",<span class="annotation">// "rgb(255, 0, 0)" "rgba(255, 0, 0, 0.3)"</span>
dash: "10,3",
weight: 2,
opacity: .5
},
yGrid: {
display: true,
color: "#323233", <span class="annotation">// "rgb(255, 0, 0)" "rgba(255, 0, 0, 0.3)"</span>
dash: "10,3", <span class="annotation">// 점선, 10만큼 칠하고 3만큼 빈공간</span>
weight: 2, <span class="annotation">// 선 두께</span>
opacity: .5 <span class="annotation">// 선 투명도</span>
},
background: {
},
menu: {
grid: true,
xGrid: true,
yGrid: true,
background: true,
download: true,
},
},
scales: {
xAxis: {
type: "number",
ticks: {
min: -10,
max: 10
}
},
dot: {
size: 10,
opacity: 1
}
}
},
};
</pre>
<pre style="color: #000; ">
<script type="module"><span class="annotation">// 해당 모듈을 불러오는 명령어</span>
import * as Chart from './src/index.js';
Chart.Chart('#scatter', config);
</script>
</pre>
<pre style="color: #000; ">
<div id="scatter"></div><span class="annotation">// 해당 차트를 만드는 명령어</span>
</pre>
</details>
</div>
</div>
</main>
</div>
<br>
<footer class="py-5 bg-dark">
<div class="container px-5"><p class="m-0 text-center text-white"> Footer 섹션 </p></div>
</footer>
</body>
</html>