-
Notifications
You must be signed in to change notification settings - Fork 4
/
example.html
30 lines (30 loc) · 1.48 KB
/
example.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
<!doctype html>
<html lang="en">
<head>
<title>JS Demo | Chartaholic</title>
<meta name='viewport' content='width=device-width,initial-scale=1'>
<meta name='google' content='notranslate'>
<meta charset='utf-8'>
<link rel='stylesheet' href='chartaholic.css'>
<script src="https://unpkg.com/popper.js@1/dist/umd/popper.min.js"></script>
<script src="https://unpkg.com/tippy.js@4"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js" integrity="sha256-mpnrJ5DpEZZkwkE1ZgkEQQJW/46CSEh/STrZKOB/qoM="
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjs/5.4.2/math.min.js" integrity="sha256-W2xP+GeD3rATAAJ/rtjz0uNLqO9Ve9yk9744ImX8GWY="
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment-with-locales.min.js" integrity="sha256-AdQN98MVZs44Eq2yTwtoKufhnU+uZ7v2kXnD5vqzZVo="
crossorigin="anonymous"></script>
<script src="chartaholic.js"></script>
<script src="coinpaprika.js"></script>
</head><body>
<div id='chart'></div>
<script>
(async () => {
let title = "Ethereum (ETH)";
let slug = "eth-ethereum";
let start_date = "2018-09-20";
let ticks = await cp.candles(slug, start_date, { limit: 366 });
let chart = new Chartaholic("#chart", { theme: "blue", keys: { time: "time_open" }, ticks, title });
})();
</script>
</body></html>