2019-08-06 14:03:05 +02:00
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
|
|
|
<title>Document</title>
|
2019-08-09 10:45:11 +02:00
|
|
|
<link rel="stylesheet" href="./style.css" />
|
2019-08-06 14:03:05 +02:00
|
|
|
<style>
|
|
|
|
file-drop {
|
|
|
|
position: relative;
|
|
|
|
box-sizing: border-box;
|
|
|
|
display: block;
|
|
|
|
padding: 10px;
|
|
|
|
background-color: rgba(245, 234, 174, 0.2);
|
|
|
|
overflow: hidden;
|
|
|
|
touch-action: none;
|
|
|
|
}
|
|
|
|
file-drop::after {
|
|
|
|
content: '';
|
|
|
|
position: absolute;
|
|
|
|
display: block;
|
|
|
|
left: 2px;
|
|
|
|
top: 2px;
|
|
|
|
right: 2px;
|
|
|
|
bottom: 2px;
|
|
|
|
border: 2px dashed #fff;
|
|
|
|
border-radius: 10px;
|
|
|
|
opacity: 0;
|
|
|
|
transform: scale(0.95);
|
|
|
|
transition: all 200ms ease-in;
|
|
|
|
transition-property: transform, opacity;
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.drop-valid::after {
|
2019-08-07 15:34:24 +02:00
|
|
|
background-color: rgba(88, 116, 88, 0.2);
|
|
|
|
border-color: rgba(65, 129, 65, 0.5);
|
2019-08-06 14:03:05 +02:00
|
|
|
opacity: 1;
|
|
|
|
transform: scale(1);
|
|
|
|
transition-timing-function: ease-out;
|
|
|
|
}
|
|
|
|
|
|
|
|
.drop-invalid::after {
|
|
|
|
background-color: rgba(255, 27, 27, 0.2);
|
|
|
|
border-color: rgba(255, 170, 170, 0.5);
|
|
|
|
opacity: 1;
|
|
|
|
transform: scale(1);
|
|
|
|
transition-timing-function: ease-out;
|
|
|
|
}
|
2019-08-09 10:45:11 +02:00
|
|
|
#download {
|
|
|
|
width: 100%;
|
|
|
|
}
|
2019-08-06 14:03:05 +02:00
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
2019-08-09 10:45:11 +02:00
|
|
|
<header>
|
|
|
|
<h1>Load chart</h1>
|
2019-08-10 09:34:57 +02:00
|
|
|
<a href="./index.html">Back to benchmark</a>
|
2019-08-09 10:45:11 +02:00
|
|
|
</header>
|
2019-08-06 14:03:05 +02:00
|
|
|
<main>
|
2019-08-09 10:45:11 +02:00
|
|
|
<h2>File-drop</h2>
|
2019-08-07 03:51:34 +02:00
|
|
|
<file-drop id="file-drop" accept="application/json"
|
|
|
|
>Drop config here</file-drop
|
|
|
|
>
|
2019-08-09 10:45:11 +02:00
|
|
|
<h2>Chart</h2>
|
2019-08-07 15:34:24 +02:00
|
|
|
<button id="download" style="display: none">Download image</button>
|
2019-08-06 14:03:05 +02:00
|
|
|
<div><canvas id="myChart" width="600" height="400"></canvas></div>
|
|
|
|
</main>
|
|
|
|
<script src="./loadChart.js"></script>
|
|
|
|
</body>
|
|
|
|
</html>
|