mbaev / Activity-Calendar

Allows to show activity in graph

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The widget allows to create calendar which shows like the contribution calendar from GitHub.

Build

For build the widget need to be installed NodeJS na npm.

npm install
cake build

#--> lib/activity-calendar.js
#--> lib/activity-calendar.min.js

How to use

new Calendar({
  container: 'calendar-id',
  color: '#2a75be',
  data: [
    ['2017-11-01', 123],
    ['2017-11-02', 456.7],
    ['2017-11-04', 234]
  ],
  intervals: [10, 20, 30, 40],
  num_weeks: 52,
  day_size: 10
});

Where:

  • container is DOM container id.
  • color mail color, which will be used for calculate colors
  • data array of elements, where each element is array. First is date of activity and count of activity points is second.
  • intervals array of intervals which will be used for generate related color based on activity points.
  • num_weeks Number of weeks to show
  • day_size size of each square in pixels.

The Means

  • Wrap or borrow from other open-source widgets when it makes sense
  • Get our NIH on when it doesn't

About

Allows to show activity in graph

License:MIT License


Languages

Language:JavaScript 87.1%Language:CoffeeScript 11.4%Language:HTML 1.3%Language:CSS 0.2%