Skip to content

Commit

Permalink
Fix domain class for month starting at 0 instead of 1
Browse files Browse the repository at this point in the history
Add new domain class for the day of week
  • Loading branch information
wa0x6e committed Jul 24, 2013
1 parent a83fb89 commit 3ee019d
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## v3.0.7 [2013-07-24]

* [fix] Fix domain month class (`m_x`) beginning at `m_0` insted of `m_1`
* [new] Add new domain class: `dy_x` for the day of the week

## v3.0.6 [2013-07-24]

* [fix] Bring back the dynamic domain width/height
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cal-heatmap",
"version": "3.0.6",
"version": "3.0.7",
"main": ["./cal-heatmap.js", "./cal-heatmap.css"],
"dependencies": {
"d3": "~v3.0.6"
Expand Down
6 changes: 3 additions & 3 deletions cal-heatmap.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! cal-heatmap v3.0.6 (Wed Jul 24 2013 15:58:23)
/*! cal-heatmap v3.0.7 (Wed Jul 24 2013 18:16:30)
* ---------------------------------------------
* Cal-Heatmap is a javascript module to create calendar heatmap to visualize time series data, a la github contribution graph
* https://github.com/kamisama/cal-heatmap
Expand Down Expand Up @@ -565,9 +565,9 @@ var CalHeatMap = function() {
var date = new Date(d);
switch(self.options.domain) {
case "hour" : classname += " h_" + date.getHours();
case "day" : classname += " d_" + date.getDate();
case "day" : classname += " d_" + date.getDate() + " dy_" + date.getDay();
case "week" : classname += " w_" + self.getWeekNumber(date);
case "month" : classname += " m_" + date.getMonth();
case "month" : classname += " m_" + (date.getMonth() + 1);
case "year" : classname += " y_" + date.getFullYear();
}
return classname;
Expand Down
4 changes: 2 additions & 2 deletions cal-heatmap.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cal-heatmap.source-map.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cal-heatmap",
"version": "3.0.6",
"version": "3.0.7",
"description": "Cal-Heatmap is a javascript module to create calendar heatmap to visualize time series data, a la github contribution graph",
"keywords": [
"calendar",
Expand Down
4 changes: 2 additions & 2 deletions src/cal-heatmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,9 +557,9 @@ var CalHeatMap = function() {
var date = new Date(d);
switch(self.options.domain) {
case "hour" : classname += " h_" + date.getHours();
case "day" : classname += " d_" + date.getDate();
case "day" : classname += " d_" + date.getDate() + " dy_" + date.getDay();
case "week" : classname += " w_" + self.getWeekNumber(date);
case "month" : classname += " m_" + date.getMonth();
case "month" : classname += " m_" + (date.getMonth() + 1);
case "year" : classname += " y_" + date.getFullYear();
}
return classname;
Expand Down

0 comments on commit 3ee019d

Please sign in to comment.