src/cal-heatmap.js
function(data, updateMode, startDate, endDate) {
		"use strict";

		if (updateMode === this.RESET_ALL_ON_UPDATE) {
			this._domains.forEach(function(key, value) {
				value.forEach(function(element, index, array) {
					array[index].v = null;
				});
			});
		}

		var temp = {};

		var extractTime = function(d) { return d.t; };

		/*jshint forin:false */
		for (var d in data) {
			var date = new Date(d*1000);
			var domainUnit = this.getDomain(date)[0].getTime();

			// The current data belongs to a domain that was compressed
			// Compress the data for the two duplicate hours into the same hour
			if (this.DSTDomain.indexOf(domainUnit) >= 0) {

				// Re-assign all data to the first or the second duplicate hours
				// depending on which is visible
				if (this._domains.has(domainUnit - 3600 * 1000)) {
					domainUnit -= 3600 * 1000;
				}
			}

			// Skip if data is not relevant to current domain
			if (isNaN(d) || !data.hasOwnProperty(d) || !this._domains.has(domainUnit) || !(domainUnit >= +startDate && domainUnit < +endDate)) {
				continue;
			}

			var subDomainsData = this._domains.get(domainUnit);

			if (!temp.hasOwnProperty(domainUnit)) {
				temp[domainUnit] = subDomainsData.map(extractTime);
			}

			var index = temp[domainUnit].indexOf(this._domainType[this.options.subDomain].extractUnit(date));

			if (updateMode === this.RESET_SINGLE_ON_UPDATE) {
				subDomainsData[index].v = data[d];
			} else {
				if (!isNaN(subDomainsData[index].v)) {
					subDomainsData[index].v += data[d];
				} else {
					subDomainsData[index].v = data[d];
				}
			}
		}
	}
function(data, updateMode, startDate, endDate) {
		"use strict";

		if (updateMode === this.RESET_ALL_ON_UPDATE) {
			this._domains.forEach(function(key, value) {
				value.forEach(function(element, index, array) {
					array[index].v = null;
				});
			});
		}

		var temp = {};

		var extractTime = function(d) { return d.t; };

		/*jshint forin:false */
		for (var d in data) {
			var date = new Date(d*1000);
			var domainUnit = this.getDomain(date)[0].getTime();

			// The current data belongs to a domain that was compressed
			// Compress the data for the two duplicate hours into the same hour
			if (this.DSTDomain.indexOf(domainUnit) >= 0) {

				// Re-assign all data to the first or the second duplicate hours
				// depending on which is visible
				if (this._domains.has(domainUnit - 3600 * 1000)) {
					domainUnit -= 3600 * 1000;
				}
			}

			// Skip if data is not relevant to current domain
			if (isNaN(d) || !data.hasOwnProperty(d) || !this._domains.has(domainUnit) || !(domainUnit >= +startDate && domainUnit < +endDate)) {
				continue;
			}

			var subDomainsData = this._domains.get(domainUnit);

			if (!temp.hasOwnProperty(domainUnit)) {
				temp[domainUnit] = subDomainsData.map(extractTime);
			}

			var index = temp[domainUnit].indexOf(this._domainType[this.options.subDomain].extractUnit(date));

			if (updateMode === this.RESET_SINGLE_ON_UPDATE) {
				subDomainsData[index].v = data[d];
			} else {
				if (!isNaN(subDomainsData[index].v)) {
					subDomainsData[index].v += data[d];
				} else {
					subDomainsData[index].v = data[d];
				}
			}
		}
	}
function ( data , updateMode , startDate , endDate ) { "use strict" ; if ( updateMode === this . RESET_ALL_ON_UPDATE ) { this . _domains . forEach ( function ( key , value ) { value . forEach ( function ( element , index , array ) { array [ index ] . v = null ; } ) ; } ) ; } var temp = { } ; var extractTime = function ( d ) { return d . t ; } ; /*jshint forin:false */ for ( var d in data ) { var date = new Date ( d * 1000 ) ; var domainUnit = this . getDomain ( date ) [ 0 ] . getTime ( ) ; // The current data belongs to a domain that was compressed // Compress the data for the two duplicate hours into the same hour if ( this . DSTDomain . indexOf ( domainUnit ) >= 0 ) { // Re-assign all data to the first or the second duplicate hours // depending on which is visible if ( this . _domains . has ( domainUnit - 3600 * 1000 ) ) { domainUnit -= 3600 * 1000 ; } } // Skip if data is not relevant to current domain if ( isNaN ( d ) || ! data . hasOwnProperty ( d ) || ! this . _domains . has ( domainUnit ) || ! ( domainUnit >= + startDate && domainUnit < + endDate ) ) { continue ; } var subDomainsData = this . _domains . get ( domainUnit ) ; if ( ! temp . hasOwnProperty ( domainUnit ) ) { temp [ domainUnit ] = subDomainsData . map ( extractTime ) ; } var index = temp [ domainUnit ] . indexOf ( this . _domainType [ this . options . subDomain ] . extractUnit ( date ) ) ; if ( updateMode === this . RESET_SINGLE_ON_UPDATE ) { subDomainsData [ index ] . v = data [ d ] ; } else { if ( ! isNaN ( subDomainsData [ index ] . v ) ) { subDomainsData [ index ] . v += data [ d ] ; } else { subDomainsData [ index ] . v = data [ d ] ; } } } }
Populate the calendar internal data

@param object data
@param constant updateMode
@param Date startDate
@param Date endDate

@return void
Populate the calendar internal data