mini-speed-chart
v1.0.2
Published
Detect connection speed with mini chart
Downloads
10
Readme
mini-speed-chart
Detect connection speed with JavaScript
Install
Install with npm
$ npm install mini-speed-chart
Or install with yarn
$ yarn add mini-speed-chart
import MiniSpeedChart from 'mini-speed-chart';
Or umd builds are also available
<script src="path/to/miniSpeedChart.js"></script>
Will expose the global variable to window.MiniSpeedChart
.
Usage
// Init
var chart = new MiniSpeedChart({
canvas: '',
url: '',
width: 180,
height: 20,
size: 2,
backgroundColor: '#000',
lineColor: '#4f0',
detectCallback: result => result
});
// Destroy
chart.destroy();
License
MIT © Harvey Zack