The Calendar Heat Map jQuery plugin allows for easy display of data such as contributions on a daily basis, indicating the number by color.
CalendarHeatmap.js is a jQuery plugin used to create a dynamic, interactive, and configurable calendar heat map for representing time series data. Hover over the slots to view details for each day on request. Inspired by the Github commitment calendar chart.
How to make use of it:
Installations:
# NPM $ npm install calendarheatmap --save # Bower $ bower install calendarheatmap --save
1. Include the required jQuery JavaScript library and Moment.js on the webpage.
<script src="/path/to/cdn/jquery.slim.min.js"></script> <script src="/path/to/cdn/moment.min.js"></script>
2. Include the jQuery CalendarHeatmap.js plugin widget after jQuery and moment.js.
<link rel="stylesheet" href="jquery.CalendarHeatmap.css"> <script src="jquery.CalendarHeatmap.min.js"></script>
3. Create a placeholder for the Calendar FlareMap/heatmap.
<div id="heatmap-demo"></div>
4. Prepare the information you need to update the calendar color representation map.
var data = [ {count: 2, date: "2017-09-23"}, {count: 1, date: "2017-10-23"}, {count: 4, date: "2017-11-11"}, {count: 5, date: "2017-11-13"}, {count: 3, date: "2017-11-21"}, ... ]
5. Visualize the information inside the calendar color representation map.
$("#heatmap-demo").CalendarHeatmap(data, { // options here });
6. All default options to customize the calendar color representation map.
$("#heatmap-demo").CalendarHeatmap(data, { // title of the calendar heatmap title: null, // the number of months to display months: 12, // the first day of the week: 1 is Monday weekStartDay: 1, // or rounded, circle tiles: { shape: "square" }, // last month lastMonth: moment().month() + 1, // last year lastYear: moment().year(), // color gradients coloring: null, // custom labels labels: { days: false, months: true, custom: { weekDayLabels: null, monthLabels: null } }, // custom legend legend: { show: true, align: "right", minLabel: "Less", maxLabel: "More", divider: " to " }, // custom tooltips // requires tooltips: { show: false, options: {} } });
7. API Strategies.
// get currently selected dates $("#heatmap-demo").CalendarHeatmap("getDates"); // update data $("#heatmap-demo").CalendarHeatmap("updateDates", data); // append additional data $("#heatmap-demo").CalendarHeatmap("appendDates", data ); // get options $("#heatmap-demo").CalendarHeatmap("getOptions"); // update options $("#heatmap-demo").CalendarHeatmap("updateOptions" { // options here });
Calendar Heatmap Plugin, Calendar Heat Map Github
See Demo And Download
Official Website(SeBassTian23): Click Here
This superior jQuery/javascript plugin is developed by SeBassTian23. For extra Advanced Usages, please go to the official website.