Skip to content

Commit

Permalink
Building 3.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wa0x6e committed Feb 2, 2014
1 parent 8e60b40 commit 352a69a
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v3.4.0 [2014-02-02]

* [fix] Fix #57 display data values in subdomain

## v3.3.12 [2014-01-31]

* [fix] Fix #69 the 'now' and 'highlight' classes are not applied to subdomain text
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"d3js",
"heat map"
],
"version": "3.3.12",
"version": "3.4.0",
"main": ["./cal-heatmap.js", "./cal-heatmap.css"],
"dependencies": {
"d3": ">= v3.0.6"
Expand Down
18 changes: 16 additions & 2 deletions cal-heatmap.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! cal-heatmap v3.3.11 (Fri Jan 31 2014 23:01:23)
/*! cal-heatmap v3.4.0 (Sun Feb 02 2014 13:03:14)
* ---------------------------------------------
* Cal-Heatmap is a javascript module to create calendar heatmap to visualize time series data
* https://github.com/kamisama/cal-heatmap
Expand Down Expand Up @@ -995,7 +995,9 @@ var CalHeatMap = function() {
.attr("y", function(d) { return self.positionSubDomainY(d.t) + options.cellSize/2; })
.attr("text-anchor", "middle")
.attr("dominant-baseline", "central")
.text(function(d){ return self.formatDate(new Date(d.t), options.subDomainTextFormat); })
.text(function(d){
return self.formatDate(new Date(d.t), options.subDomainTextFormat);
})
;
}

Expand Down Expand Up @@ -1408,8 +1410,20 @@ CalHeatMap.prototype = {
.text(function(d) { return parent.getSubDomainTitle(d); })
;

function formatSubDomainText(element) {
if (typeof options.subDomainTextFormat === "function") {
element.text(function(d) { return options.subDomainTextFormat(d.t, d.v); });
}
}

/**
* Change the subDomainText class if necessary
* Also change the text, e.g when text is representing the value
* instead of the date
*/
rect.transition().duration(options.animationDuration).select("text")
.attr("class", function(d) { return "subdomain-text" + parent.getHighlightClassName(d.t); })
.call(formatSubDomainText)
;
},

Expand Down
6 changes: 3 additions & 3 deletions cal-heatmap.min.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.3.12",
"version": "3.4.0",
"description": "Cal-Heatmap is a javascript module to create calendar heatmap to visualize time series data",
"keywords": [
"calendar",
Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! cal-heatmap v3.3.11 (Fri Jan 31 2014 23:01:23)
/*! cal-heatmap v3.4.0 (Sun Feb 02 2014 13:03:14)
* ---------------------------------------------
* Cal-Heatmap is a javascript module to create calendar heatmap to visualize time series data
* https://github.com/kamisama/cal-heatmap
Expand Down

0 comments on commit 352a69a

Please sign in to comment.