0.1.1 • Published 7 years ago

angular-heatmap-calendar v0.1.1

Weekly downloads
10
License
MIT
Repository
github
Last release
7 years ago

angular-heatmap-calendar

angular-heatmap-calendar is a heatmap generator for angular.

image

Usage

$ bower install angular-heatmap-calendar

$ npm install angular-heatmap-calendar

Then import angular-heatmap-calendar's js and css files into your project

<link rel="stylesheet" href="[Script-Path]/angular-heatmap-calendar/heatMapCalendar.css" />

<script src="[Script-Path]/moment/moment.js"></script>
<script src="[Script-Path]/angular/angular.min.js"></script>
<script src="[Script-Path]/angular-heatmap-calendar/heatMapCalendar.js"></script>

then import module dk.ngHeatMapCal in your angular application

//import module
var app = angular.module('plunker', ['dk.ngHeatMapCal']);

Use <heat-map-cal/> directive in your template

<heat-map-cal data="vm.randomDataMap" weeks="52" interval="8" tooltip-Formatter="vm.commitTooltipFormatter"></heat-map-cal>

parameters

parameter nameis requiredata description
datatruea object that contains heat map data. see data format for more details
weekstruenumber of weeks to show
intervaltrueinterval of each color
tooltipFormatterfalsea formatter that accept date and heat-value, and return formatted tooltip text
mapStylefalsestyle of map, available value are round,square
showLegendfalseshould show legend component
showWeekLabelfalseshould show week label
showMonthLabelfalseshould show month Label

examples

parameter namevalue
mapStyleround
showLegendfalse
showWeekLabelfalse
showMonthLabelfalse

image

parameter namevalue
showLegendtrue
showWeekLabeltrue
showMonthLabeltrue

image