<div id ='info'>
<h3>A simple calendar chart example.</h3>
</div>
<div id ='chart'></div>
#info {
margin: 1em;
}
//A simple calendar chart structure
//Structure of the dataSet
//Calendar dataset takes Unix timestamp as parameter for 'd'
//'v' is the square colour intensity
let dataTime = [
{d: 1462057200000, v: 10},
{d: 1462402800000, v: 5},
{d: 1464822000000, v: 15}
];
let chart = d3_rs_squares.html()
.type('calendar.days'); //the type need to be set for calendar property since by default it is set to matrix
d3.select('#chart')
.datum(dataTime)
.call(chart)
View Compiled