JSFiddle - React, Tailwind, and code Playground
by Nick Craver
HTML
<script src="http://people.iola.dk/olau/flot/jquery.flot.js"></script>
<div id="placeholder" style="width:600px;height:300px;"></div>
JavaScript
$(function () {
var d1 = [[0, 12], [4, 560], [8, 890], [9, 320]];
$.plot($("#placeholder"), [ d1 ],{
yaxis: { max: 1024, ticks: [128, 256, 512, 768, 1024] },
grid: {
markings: function (axes) {
var markings = [];
for (var i = 0; i<1024; i+=128)
markings.push({ yaxis: { from: i, to: i+128 }, color: i%256==0 ? "#eee": "#fff" });
return markings;
}
}
});
});