JSFiddle - React, Tailwind, and code Playground

by hal9000pro

HTML

<script src="http://code.highcharts.com/stock/highstock.js"></script>
<div id="stock-mails-diagram">bla bla</div>

JavaScript

var mails=[[1387929600000,540],[1388016000000,810],[1388102400000,808],[1388188800000,773],[1388275200000,738],[1388361600000,851],[1388448000000,806],[1388534400000,698],[1388620800000,722],[1388707200000,651],[1388793600000,619],[1388880000000,574],[1388966400000,630],[1389052800000,173]];

$(function(){
    $('#stock-mails-diagram').hide().
        highcharts('StockChart', {
			rangeSelector : {
				buttons:[{
					type: 'day',
					count:7,
					text:'7d'
				},{
					type: 'month',
					count:1,
					text:'1m'
				},{
					type: 'year',
					count:1,
					text:'1y'
				}],
				selected:0,
				inputDateFormat:"%Y-%m-%d",
				inputEditDateFormat:"%Y-%m-%d"
			},

			title : {
				text : 'Emails sent per day'
			},
			series : [
			{
				name : 'mails sent',
				type: 'area',
				step: 'true',
				data : mails
			}],
			plotOptions:{
				area:{
					dataLabels:{
						enabled:false
					}
				}
			}
		});
    $('#stock-mails-diagram').show();
});