examples/script/example.js
function generateData() {
  var firstDate = new Date();

  var dataProvider = [];

  for (var i = 0; i < 100; ++i) {
    var date = new Date(firstDate.getTime());

    date.setDate(i);

    dataProvider.push({
      date: date,
      value: Math.floor(Math.random() * 100)
    });
  }

  return dataProvider;
}
function generateData() {
  var firstDate = new Date();

  var dataProvider = [];

  for (var i = 0; i < 100; ++i) {
    var date = new Date(firstDate.getTime());

    date.setDate(i);

    dataProvider.push({
      date: date,
      value: Math.floor(Math.random() * 100)
    });
  }

  return dataProvider;
}
function generateData ( ) { var firstDate = new Date ( ) ; var dataProvider = [ ] ; for ( var i = 0 ; i < 100 ; ++ i ) { var date = new Date ( firstDate . getTime ( ) ) ; date . setDate ( i ) ; dataProvider . push ( { date : date , value : Math . floor ( Math . random ( ) * 100 ) } ) ; } return dataProvider ; }
Generate random data
Generate random data