JSFiddle - React, Tailwind, and code Playground

by magneto903

HTML

<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
<p>
    Here's a simple Plotly plot - 
    <a href="http://bit.ly/1Or9igj">plotly.js documentation</a>
</p>

<!-- Plots go in blank <div> elements. 
    You can size them in the plot layout,
    or give the div a size as shown here.
-->
<div id="tester" style="width:600px;height:250px;"></div>

JavaScript

TESTER = document.getElementById('tester');

var npoints = 1e5;
var y = [];
for (var i = 0, l = npoints; i < l; i++) {
    y.push(Math.random())
};

var x = [];
for (var i = 0, l = npoints; i < l; i++) {
    x.push(i);
};
var t0 = performance.now();
Plotly.plot( TESTER, [{type: 'scattergl',
    x: x,
    y: y }], { 
    margin: { t: 0 } } );


//Plotly.redraw(TESTER);
var t1 = performance.now();
console.log("Call to redraw took " + (t1 - t0) + " milliseconds.")
var t0 = performance.now();
//Plotly.redraw(TESTER);
var t1 = performance.now();
console.log("Call 2 to redraw took " + (t1 - t0) + " milliseconds.")