function getRandomSeriesData(total) {
  const result = [];
  let lastY = seededRandom() * 40 - 20;
  let y;
  const firstY = lastY;
  for (let i = 0; i < total; i++) {
    y = seededRandom() * firstY - firstY / 2 + lastY;
    result.push({
      x: i,
      y
    });
    lastY = y;
  }
  return result;
}
Get the array of x and y pairs.
The function tries to avoid too large changes of the chart.
@param {number} total Total number of values.
@returns {Array} Array of data.
@private