angular-cal-heatmap-directive

WebJar for angular-cal-heatmap-directive

License

License

MIT
Categories

Categories

Angular User Interface Web Frameworks
GroupId

GroupId

org.webjars.bower
ArtifactId

ArtifactId

angular-cal-heatmap-directive
Last Version

Last Version

1.3.0
Release Date

Release Date

Type

Type

jar
Description

Description

angular-cal-heatmap-directive
WebJar for angular-cal-heatmap-directive
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/shekhargulati/angular-cal-heatmap-directive

Download angular-cal-heatmap-directive

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bower/angular-cal-heatmap-directive/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>angular-cal-heatmap-directive</artifactId>
    <version>1.3.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/angular-cal-heatmap-directive/
implementation 'org.webjars.bower:angular-cal-heatmap-directive:1.3.0'
// https://jarcasting.com/artifacts/org.webjars.bower/angular-cal-heatmap-directive/
implementation ("org.webjars.bower:angular-cal-heatmap-directive:1.3.0")
'org.webjars.bower:angular-cal-heatmap-directive:jar:1.3.0'
<dependency org="org.webjars.bower" name="angular-cal-heatmap-directive" rev="1.3.0">
  <artifact name="angular-cal-heatmap-directive" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='angular-cal-heatmap-directive', version='1.3.0')
)
libraryDependencies += "org.webjars.bower" % "angular-cal-heatmap-directive" % "1.3.0"
[org.webjars.bower/angular-cal-heatmap-directive "1.3.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.bower : angular jar [1.2.0,1.3)
org.webjars.bower » cal-heatmap jar [3.4.0,3.5)

Project Modules

There are no modules declared in this project.

#Cal Heatmap AngularJS Directive#

This is an AngularJS directive for cal-heatmap http://kamisama.github.io/cal-heatmap/

##How to use it##

Use bower to install the library

$ bower install angular-cal-heatmap-directive

Create an index.html as shown below.

<html>
<head>
	<meta http-equiv="content-type" content="text/html; charset=UTF8">
	<title>Angular Cal Heatmap directive</title>
	<link rel="stylesheet" type="text/css" href="bower_components/cal-heatmap/cal-heatmap.css">
</head>
<body ng-app="myapp">

<cal-heatmap></cal-heatmap>

<script type="text/javascript" src="bower_components/angular/angular.js"></script>
<script type="text/javascript" src="bower_components/d3/d3.js"></script>
<script type="text/javascript" src="bower_components/cal-heatmap/cal-heatmap.js"></script>
<script type="text/javascript" src="bower_components/angular-cal-heatmap-directive/dist/1.3.0/calHeatmap.min.js"></script>
<script type="text/javascript" src="app.js"></script>
</body>

</html>

The app.js is the application Angualar app. Add the dependency to the calHeatmap directive in the app.js as shown below.

angular.module('myapp',['calHeatmap']);

This will generate a default Cal Heatmap as shown below.

To add your own configuration, you can use config attribute as shown below.

<html>
<head>
	<meta http-equiv="content-type" content="text/html; charset=UTF8">
	<title>Angular Cal Heatmap directive</title>
	<link rel="stylesheet" type="text/css" href="bower_components/cal-heatmap/cal-heatmap.css">
</head>
<body ng-app="myapp">

<cal-heatmap config="{domain:'year',range:1,cellSize:15}"></cal-heatmap>

<script type="text/javascript" src="bower_components/angular/angular.js"></script>
<script type="text/javascript" src="bower_components/d3/d3.js"></script>
<script type="text/javascript" src="bower_components/cal-heatmap/cal-heatmap.js"></script>
<script type="text/javascript" src="bower_components/angular-cal-heatmap-directive/dist/1.3.0/calHeatmap.min.js"></script>
<script type="text/javascript" src="app.js"></script>
</body>

</html>

This will produce the heatmap as shown below.

This directive supports most of the options supported by cal-heatmap library http://kamisama.github.io/cal-heatmap/#options

Versions

Version
1.3.0