Skip to content

Commit

Permalink
Fix DateColorScale
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou committed Sep 17, 2019
1 parent b714ddf commit 4a63f75
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/src/scales/ColorScaleModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ class ColorScaleModel extends LinearScaleModel {
const domain = [];
for (let i = 0; i < nColors; i++) {
const j = this.reverse ? nColors-1-i : i;
domain.push(scale(j));
if (this.type == 'date_color_linear') {
domain.push(new Date(scale(j)));
} else {
domain.push(scale(j));
}
}
return domain;
}
Expand Down

0 comments on commit 4a63f75

Please sign in to comment.