v1
5/3/2021 by dsmmcken -00
disable setup HTML
Setup HTML
<script src='https://cdn.plot.ly/plotly-latest.min.js'></script>

<div id='myDiv'><!-- Plotly chart will be drawn inside this DIV --></div>
disable setup JavaScript
Setup JavaScript
const numPoints = 1000;
const numBreaks = 10;
const domainVals = new Array(numPoints);
const rangeVals = new Array(numPoints);

for (let i = 0; i < numPoints; i++) {
  // increment a time by 1 hour 
  // builds a yyyy-mm-dd HH:MM:SS.sss string
  domainVals[i] = new Date(new Date().setHours(new Date().getHours() + i)).toISOString().slice(0, -1).replace("T"," ");
  rangeVals[i] = i;
}

const trace = {
  x: domainVals,
  y: rangeVals,
  type: 'scatter'
};

var data = [trace];

var layoutBreaks = {
  xaxis: {
    type: 'date',
    rangebreaks: [
      {
        values: domainVals.slice(0,numBreaks), // break the first 10, I don't think it matters where they are
        dvalue: 60 * 60 * 1000 * 1 // 1 hour break
      }
    ]
  },
};

var layoutNoBreaks= {};

delete caserun single casemove downdrag and drop case


ready



Plotly.newPlot('myDiv', data, layoutBreaks);
delete caserun single casemove updrag and drop case


ready



Plotly.newPlot('myDiv', data, layoutNoBreaks);
Test Case - click to add another test case
Teardown JS - click to add teardown JavaScript
Output (DOM) - click to monitor output (DOM) while test is running
RUN