matse.dev ·
· ![License: MIT](https://camo.githubusercontent.com/6552afb9038154d801c50b6e55a76db78a6787a8d6e2b5252a44864503c52887/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667)
my webpage based on jeykll.
bundle install
bundle exec jekyll serve
:fire: d3 calendar heatmap for angular
Home Page: https://fischer-matthias.github.io/ng-calendar-heatmap/
License: MIT License
my webpage based on jeykll.
bundle install
bundle exec jekyll serve
Hello,
Very good module, can you however add a functionality (missing for me), namely the format of the date in the tooltip?
Currently the format is 'ddd, MMM Do YYYY' which is not suitable for my country (France).
I think the following code should suffice in calendar.local.d.ts (models folder):
export interface CalendarLocale {
months: string [];
days: string [];
no: string;
on: string;
less: string;
more: string;
dateMomentFormat: string;
}
Then change into ng-calendar-heatmap.js.map file change getDefaultOptions () function to:
function getDefaultOptions () {
return {
width: 705,
height: 110,
responsive: false,
legendWidth: 95,
SQUARE_LENGTH: 11,
SQUARE_PADDING: 2,
MONTH_LABEL_PADDING: 6,
DAY_WIDTH: 12,
MONTH_LABEL_HEIGHT: 10,
now: new Date (),
yearAgo: new Date (),
startDate: null,
max: null,
colorRange: ['# D8E6E7', '# 218380'],
tooltipEnabled: true,
tooltipUnit: 'contribution',
legendEnabled: true,
onClick: null,
weekStart: CalendarWeekStart.SUNDAY,
local: {
months: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ],
days: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
no: 'No',
on: 'on',
less: 'Less',
more: 'More',
dateMomentFormat: 'ddd, MMM Do YYYY'
}
};
}
Finally, by modifying the tooltipHTMLForDate (d) function:
tooltipHTMLForDate(d) {
const dateStr = time (d).format(this.options.locale.dateMomentFormat);
const count = this.countForDate(d);
return '<span> <strong>'
+ (count? count: this.options.locale.no)
+ '' + this.pluralizedTooltipUnit(count)
+ '</strong>' + this.options.locale.on + '' + dateStr
+ '</span>';
}
If you could do that it will be perfect (for me among others).
Good continuation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.