jQuery plugin for showing a calendar yearview with blocks (github contributions style)

Overview

calendar-yearview-blocks

jQuery plugin for showing a calendar yearview with blocks (github contributions style)

Code adopted from https://github.com/bachvtuan/Github-Contribution-Graph and expanded.

Allows for up to 4 items per day that will be shown on the calendar (square, triangle, stripes and cubes, respectively). Expects a JSON as data input in the form of:

{
    "2020-08-01": {
        "items": ["banana", "apple"]
    }, 
    "2020-09-01": {
        "items": ["orange"]
    }
}

Settings are self-explanatory:

$('#cal_chart_1').calendar_yearview_blocks({
    data: '{"2020-08-01": {"items": ["banana", "apple"]}, "2020-05-05": {"items": ["apple"]}, "2020-05-01": {"items": ["banana"]}, "2020-05-03": {"items": ["banana", "apple", "orange"]}, "2020-05-22": {"items": ["banana", "apple", "orange", "pear"], "legend": "The whole basket"}}',
    start_monday: true,
    always_show_tooltip: true,
	stylize_today: false, // Draw a box around today's date.
	//final_date: '2021-12-31', // Set the last date to be displayed. If not set, defaults to the current day.
	tooltip_style: 'default', // 'default': the tooltip will include the date, newline, and the values.
                             // The values can be overridden by including a 'legend' value in the data object.
                             // 'custom': the 'legend' value will encompass the entire tooltip.
    month_names: ['jan', 'feb', 'maa', 'apr', 'mei', 'jun', 'jul', 'aug', 'sept', 'okt', 'nov', 'dec'],
    day_names: ['ma', 'wo', 'vr', 'zo'],
    colors: {
        'default': '#eeeeee', // Default color
        'apple': 'green',
        'banana': 'yellow',
        'orange': 'orange',
        'pear': 'lightgreen'
    }
});

Demo screenshot

MIT license

You might also like...

Kirby Conditional Blocks plugin

Kirby 3 plugin: disables blocks in layout fields when the column width does not match the block requirements

Dec 21, 2022

An obsidian plugin that give additional features to code blocks.

An obsidian plugin that give additional features to code blocks.

Obsidian Advanced Codeblock Add additioinal features to code blocks. Demo Feature Add line numbers to code block Add line highlight to code block Usag

Jan 3, 2023

An obsidian plugin that allows code blocks executed interactively in sandbox like jupyter notebooks. Supported language rust、kotlin、python、Javascript、TypeScript etc.

An obsidian plugin that allows  code blocks executed interactively in sandbox like jupyter notebooks. Supported language rust、kotlin、python、Javascript、TypeScript etc.

Obsidian Code Emitter This plugin allows code blocks executed interactively like jupyter notebooks. Currently, support languages: Rust Kotlin JavaScri

Dec 28, 2022

A docsify.js plugin for rendering LaTeX math blocks from markdown

docsify-latex A docsify.js plugin for typesetting LaTeX with display engines from markdown. Docsify + LaTeX = ❤️ Installation Add JavaScript LaTeX dis

Dec 25, 2022

A Tempermonky / Greasemonkey plugin which can help you export your class schedule to the calendar on your phone / pad / PC / Mac.

A Tempermonky / Greasemonkey plugin which can help you export your class schedule to the calendar on your phone / pad / PC / Mac.

WHU Class Schedule Export as iCS Languages: English | 簡體中文 | 繁體中文 Changelog v0.90.1 - Sep 18, 2022 Fix bugs: Fix an error when a class have multiple s

Sep 7, 2022

jQuery plugin to add 360 rotatable bubble style tooltips

Sorry, this project is no longer maintained. grumble.js Add a bubble to any element; configure its rotation on a 360 degree axis and define its distan

Nov 9, 2022

The Taste food web app is our JavaScript capstone project, Taste food is a web application based on an external food API, showing data about Italian foods and we used Used involvement API to record the different user interactions (likes, comments).

taste-food The Taste food web app is our JavaScript capstone project, Taste food is a web application based on an external food API TheMealDB, showing

Aug 10, 2022

This web application is a type of a scoreboard showing the names and current scores of the leading competitors in any field which is using API's to get and set data

This web application is a type of a scoreboard showing the names and current scores of the leading competitors in any field which is using API's to get and set data

Leaderboard-project This web application is a type of a scoreboard showing the names and current scores of the leading competitors in any field which

Feb 11, 2022

Sample apps showing how to build music and video apps for Xbox using a WebView.

Sample apps showing how to build music and video apps for Xbox using a WebView.

description languages name page_type products urlFragment Sample showing how to build music and video apps using primarily web technologies for Xbox.

Dec 14, 2022
Comments
  • Allow for a custom legend in the tooltip

    Allow for a custom legend in the tooltip

    Also allows removal of the default date format in the tooltip. The user can specify the date, themselves, in the legend (e.g. "February 28, 2021
    Foo Bar Baz"), or just leave it off.

    opened by tilghman 0
  • Data as string vs object

    Data as string vs object

    What was the intent behind making the data parameter a string, rather than an object?

    This originally tripped me up while I was implementing the module in a project. It seems like it could be an object, directly, and it would behave a lot more like other modules. It would also simplify the example code, as we could space the object over multiple lines, and it would wrap in the README.

    opened by tilghman 1
Owner
Opbod
Opbod
Sync your personal calendar to your work calendar, privately 🐒

Callibella ?? It is considered unusual among Callibella in that it gives birth to only a single baby instead of twins, the norm for Callibella. Wikiep

Yo'av Moshe 19 Oct 12, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Completely free TS/JS one-file source code snippets with tests, which can be copied to avoid extra dependencies (contributions welcome).

TinySource Completely free TS/JS one-file source code snippets with tests, which can be copied to avoid extra dependencies (contributions welcome). Sn

null 81 Jan 3, 2023
MySQL meets Jupyter notebooks. Grasp provides a new way to learn and write SQL, by providing a coding-notebook style with runnable blocks, markdown documentation, and shareable notebooks. ✨

A New Way to Write & Learn SQL Report Bug · Request Feature Table of Contents About The Project Built With Getting Started Prerequisites Installation

Lakshya 7 Sep 1, 2022
Tag cloud plugin for jQuery, showing bigger tags in the center

jquery.tagcloud v1.2.0 Tag cloud plugin for jQuery, showing bigger tags in the center. Usage There are two ways to define a tag cloud: Use ul and li H

Peter Thoeny 1 Jun 30, 2022
Base62-token.js - Generate & Verify GitHub-style & npm-style Base62 Tokens

base62-token.js Generate & Verify GitHub-style & npm-style Secure Base62 Tokens Works in Vanilla JS (Browsers), Node.js, and Webpack. Online Demo See

Root 4 Jun 11, 2022
Simple calendar jquery plugin

Simple Calendar A simple and easy plugin to create a calendar and add events to it. Usage Including files You need to include : A recent version of JQ

Benoit Rospars 42 Dec 29, 2022
A simple Calendar Heatmap for jQuery

Calendar Heat Map This jQuery plugin allows to conveniently display data like contributions on a day by day basis, indicating the count by colors. Ins

Sebastian 38 Jul 5, 2022