<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

External CSS

  1. //static.redsift.io/reusable/ui-rs-core/latest/css/ui-rs-core.min.css

External JavaScript

  1. //d3js.org/d3.v4.min.js
  2. //static.redsift.io/reusable/d3-rs-squares/latest/d3-rs-squares.umd-es2015.min.js