Skip to content

Instantly share code, notes, and snippets.

@shuhrat
Created January 5, 2016 15:11
Show Gist options
  • Select an option

  • Save shuhrat/4f4fc00a4e5ce55b55f5 to your computer and use it in GitHub Desktop.

Select an option

Save shuhrat/4f4fc00a4e5ce55b55f5 to your computer and use it in GitHub Desktop.
var cal = new CalHeatMap();
cal.init({
itemSelector: $element,
domain: "month",
subDomain: "x_day",
range: 3,
cellSize: 20,
cellPadding: 5,
domainGutter: 20,
start: new Date(2016, 0, 1),
weekStartOnMonday: true,
tooltip: false,
subDomainTextFormat: "%d",
displayLegend: true,
legendVerticalPosition: "top",
legendMargin: [0, 0, 20, 0],
legendCellSize: 20,
legendCellPadding: 5,
legend: [1, 2, 3, 4],
highlight: new Date(2016, 0, 1) // Highlight January 1st
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment