calendarchart
Calendar of a year or of the last days as a grid of weeks with one coloured cell per day, like the activity of GitHub, with a legend, a total, a tooltip and keyboard access
Shows a value per day over months: visits, AI agent visits, orders, deployments. Every column is a week and every cell a day, coloured from light to dark in a few steps. The steps are quantiles of the days with a value, so a few big days do not leave the rest of the year pale. It re-renders on every change of the model.
The model is an Object with yyyy-MM-dd keys, or an Array:
{ '2026-11-21': 1180, '2026-11-22': 1320 }
// or
[{ date: '2026-11-22', value: 1320 }, { date: new Date(2026, 10, 21), value: 1180 }]- The range is the last
daysdays until today, or the wholeyear. - The weeks start on the first day of the locale (or
firstday); month and day names come fromIntlin the language of the page. - The cells fill the width (from 10 to 18px); narrow boxes show the last weeks that fit.
- The grid has one tab stop: left and right move a week, up and down a day,
Home/Endgo to the first and the last day,Enter/Spacerunclick, and a screen reader announces the date and the value. A table has the total of every month. - The label is the content of the tag, so it can contain markup and
@(...)translations.
Configuration:
label {String}the label when the content of the tag is empty (default:'')style {String}card(a box) orminimal(no box) (default:card)days {Number}the count of days until today (default:365)year {Number}a whole calendar year instead of the last days, example:2026(default:'')cell {Number}the size of a cell in pixels,0fills the width (default:0)steps {Number}the count of colour steps with a value, from2to6(default:5)color {String}a hex colour instead of the primary colour of the app, example:#6250D6(default:'')legend {Boolean}shows the legend (default:true)less {String}the text before the legend, example:Less; empty shows0(default:'')more {String}the text after the legend, example:More; empty shows the value of the last step (default:'')caption {String}a text after the total, example:visits(default:'')firstday {Number}the first day of the week,0is Sunday and1Monday; empty is the one of the locale (default:'')format {String}numberorcurrency(default:number)decimals {Number}the maximum count of decimals (default:0)compact {Boolean}values from 10,000 are shortened:159.4K(default:true)currency {String}the currency code forformat:currency(default:EUR)locale {String}a language for the numbers and the dates, example:es-ES; empty is the language of the page (default:'')
Callbacks:
click {String}link to a globalfunction(day, component), executed when the user clicks a day or pressesEnter/Spaceon it;dayis{ date, key, value }wherekeyisyyyy-MM-dd
Runtime: jComponent v20, no dependencies.




