// Set up the x-axis to show the time range in the data buffer
c.xAxis().setDateScale(
new Date(lastTime.getTime() - dataInterval * timeStamps.length), lastTime);
// Set the x-axis label format
c.xAxis().setLabelFormat("{value|hh:nn:ss}");
// Create a line layer to plot the lines
LineLayer layer = c.addLineLayer2();
// The x-coordinates are the timeStamps.