julienr114 / vue-calendar-heatmap Goto Github PK
View Code? Open in Web Editor NEWA lightweight calendar heatmap Vuejs component built on SVG, inspired by github's contribution calendar graph
A lightweight calendar heatmap Vuejs component built on SVG, inspired by github's contribution calendar graph
Hello,
I'm glad to see that someone else has done it before I design and code github-like heatmap calendar. But unfortunately this repository has no licence and does not represent anything about usage. If you ever relase it under M.I.T. licence, I'd be happy to have your code in my open-source project github.com/ikidnapmyself/vision
Cosmic regards!
Hello
By default the tooltip message consists of day.count and intensity. it will be cool if the message is customizable (at least on the first part)
Thanks
Are there any plans for vue3 support?
Would be great if this was possible
for example if i was in the month of october i want to only see the heatmap for the month of october.
Is there any hidden setting for displaying monday as the first day of the week?
Vuejs 2.5.17 on Firefox & Chromium
<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<head>
<title>Welcome to my Heatmap</title>
<script src="./vue.js"></script>
<link rel="stylesheet" href="./vue-calendar-heatmap.css"/>
<script src="./vue-calendar-heatmap.browser.js"></script>
</head>
<body>
<div id="app">
<calendar-heatmap :endDate="today" :values="values"/>
</div>
<script>
new Vue({
el: '#app',
components: {
VueCalendarHeatmap
},
data: {
today: new Date(),
values: [{ date: '2018-09-22', count: 6 }]
},
});
</script>
</body>
</html>
It doesn't matter how I pass endDate
through the component. :endDate="2018-09-11"
or endDate="2018-09-11"
also failed with the same message.
However, when I change the endDate
property like this
diff --git a/src/components/CalendarHeatmap.vue b/src/components/CalendarHeatmap.vue
index 18cde00..5460d4e 100644
--- a/src/components/CalendarHeatmap.vue
+++ b/src/components/CalendarHeatmap.vue
@@ -72,7 +72,7 @@ export default {
props: {
endDate: {
- required: true
+ default: new Date()
},
max: {
type: Number
and re-run npm run build:browser
, I receive another error message
[Vue warn]: Invalid default value for prop "endDate": Props with type Object/Array must use a factory function to return the default value.
But vue dev tools shows that endDate
is a correct date object.
So I've absolutely now idea how to use this component correctly. Any hints?
when i add import VueCalendarHeatmap from 'vue-calendar-heatmap
in main.js,
it warn me
can not find module “vue-calendar-heatmap” declare file。“d:/learn-game-ui/ruoyi-ui/node_modules/vue-calendar-heatmap/dist/vue-calendar-heatmap.common.js”隐式拥有 "any" 类型。 尝试使用
npm i --save-dev @types/vue-calendar-heatmap(如果存在),或者添加一个包含
declare module 'vue-calendar-heatmap'; 的新声明(.d.ts)文件ts(7016)
is there any way to call each day on the calendar? I try to use @click
but nothing happened in my called function. Please add it onClick props for certain needs
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.