flipside-js/index.html
2019-03-01 02:04:45 -05:00

174 lines
4.1 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>flipside.js</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script src="flipside-v1.9.0.js"></script>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol";
padding: 0;
margin: 0;
}
text {
font-weight: 700;
font-size: 24px;
}
.wrapper {
border: 1px solid #ccc;
padding: 20px;
width: 500px;
font-weight: 700;
font-size: 20px;
}
.wrapper p {
font-size: 40px;
}
#widget-1 {
background: black;
}
#widget-2 {
width: 300px;
background: #33435e;
}
</style>
</head>
<body>
<div class="wrapper"><div id="chart"></div></div>
<div class="wrapper dark" style="background-color:#000000">
<div id="chart2"></div>
</div>
<div class="wrapper"><div id="score"></div></div>
<div class="wrapper"><div id="widget-0" style="width: 289px;"></div></div>
<div class="wrapper" style="background-color:#000000">
<div id="widget-1" style="width: 289px"></div>
</div>
<div class="wrapper" style="background-color: #33435e">
<div id="widget-2"></div>
</div>
<div class="wrapper"><div id="multiTable"></div></div>
<script>
const flipside = new Flipside("a7936778-4f87-4790-889f-3ab617271458");
flipside.chart("chart", {
title: "Bitcoin Health",
series: [
{
name: "BTC FCAS",
symbol: "BTC",
metric: "fcas",
type: "line",
yAxis: 0
},
{
name: "BTC Dev",
symbol: "BTC",
metric: "dev",
type: "line",
yAxis: 1
}
],
rangeSelector: {
enabled: false
}
});
flipside.chart("chart2", {
mode: "dark",
title: "Ethereum Health",
axisTitles: ["FCAS", "Dev"],
colors: ["#E44C27", "#7FCCC5"],
series: [
{ symbol: "ETH", metric: "fcas", type: "line", yAxis: 0 },
{ symbol: "ETH", metric: "dev", type: "line", yAxis: 1 }
]
});
flipside.spectrum("widget-0", {
asset: {
symbol: "nmr",
highlights: ["BTC", "ETH", "QTUM"]
},
mode: "light",
fontFamily: "inherit",
relatedMarkers: {
enabled: true,
bucketDistance: 35,
lineDistance: 25,
fontFamily: "inherit"
},
name: { enabled: true, style: {} },
spectrum: { enabled: true },
icon: { enabled: true },
rank: { enabled: true },
trend: { enabled: true }
});
flipside.spectrum("widget-1", {
assets: [
{
symbol: "eth",
highlights: ["BTC", "NMR", "QTUM"]
},
{
symbol: "xrp",
highlights: ["BTC", "NMR", "QTUM"]
},
{
symbol: "btc",
highlights: ["eos", "NMR", "QTUM"]
}
],
mode: "dark",
bucketDistance: 100,
relatedMarkers: {
bucketDistance: 55,
lineDistance: 35
}
});
flipside.createTable("widget-2", "btc", {
dark: true,
borderColor: "#737e8d"
});
flipside.multiTable("multiTable", {
columns: ["rank", "trend"],
exclusions: ["gas", "TRX"],
fontFamily: "inherit",
headers: {},
limit: 15,
page: 1,
mode: "light",
rows: {
dividers: true
},
title: {
text: "Top Coins",
style: { fontSize: "24px", fontWeight: 400 }
},
trend: {
changeOver: 7
}
});
flipside.score("score", { symbol: "eth" });
</script>
</body>
</html>