Skip to content

Commit

Permalink
Remove datapoint with duplicate timestamp in order to fix sample (cha…
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann authored and simonbrunel committed Apr 1, 2019
1 parent 98a8399 commit 046adec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions samples/scales/time/financial.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@

var date = moment('Jan 01 1990', 'MMM DD YYYY');
var now = moment();
var data = [randomBar(date, 30)];
var data = [];
var unit = document.getElementById('unit').value;
for (; data.length < 60 && date.isBefore(now); date = date.clone().add(1, unit)) {
if (date.isoWeekday() <= 5) {
data.push(randomBar(date, data[data.length - 1].y));
data.push(randomBar(date, data.length > 0 ? data[data.length - 1].y : 30));
}
}

Expand Down

0 comments on commit 046adec

Please sign in to comment.