vue-calendar-heatmap
Advanced tools
Comparing version 0.2.5 to 0.2.6
{ | ||
"name": "vue-calendar-heatmap", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"description": "A calendar heatmap Vuejs component built on SVG, inspired by github's contribution calendar graph", | ||
@@ -5,0 +5,0 @@ "author": "Julien Rabin <julien@wildcodeschool.fr>", |
@@ -6,3 +6,3 @@ import { DAYS_IN_ONE_YEAR, DAYS_IN_WEEK } from './consts' | ||
this.endDate = this._parseDate(endDate) | ||
this.max = max || Math.max(...values.map(day => day.count)) | ||
this.max = max || Math.ceil((Math.max(...values.map(day => day.count)) / 5) * 4) | ||
this.startDate = this._shiftDate(endDate, -DAYS_IN_ONE_YEAR) | ||
@@ -60,4 +60,6 @@ this.values = values | ||
return 0 | ||
} else if (value >= this.max) { | ||
return 4 | ||
} else { | ||
return Math.ceil(((value * 100) / this.max) * 0.04) | ||
return Math.ceil(((value * 100) / this.max) * (0.03)) | ||
} | ||
@@ -64,0 +66,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
308056
141