All Projects → julienr114 → Vue Calendar Heatmap

julienr114 / Vue Calendar Heatmap

A lightweight calendar heatmap Vuejs component built on SVG, inspired by github's contribution calendar graph

Projects that are alternatives of or similar to Vue Calendar Heatmap

React Planner
✏️ A React Component for plans design. Draw a 2D floorplan and navigate it in 3D mode.
Stars: ✭ 846 (+605%)
Mutual labels:  svg, component
React Svg Map
A set of React.js components to display an interactive SVG map
Stars: ✭ 150 (+25%)
Mutual labels:  svg, component
Vue Content Loader
SVG component to create placeholder loading, like Facebook cards loading.
Stars: ✭ 2,790 (+2225%)
Mutual labels:  svg, component
Respin
React SVG loading spinner based on jxnblk.com/loading
Stars: ✭ 21 (-82.5%)
Mutual labels:  svg, component
Svg To Component
Convert SVG to React/Vue components
Stars: ✭ 40 (-66.67%)
Mutual labels:  svg, component
Any Ui
❄️ 一个移动端组件库
Stars: ✭ 58 (-51.67%)
Mutual labels:  svg, component
Vue Svg Map
A set of Vue.js components to display an interactive SVG map
Stars: ✭ 48 (-60%)
Mutual labels:  svg, component
Reaviz
📊 Data visualization library for React based on D3
Stars: ✭ 1,141 (+850.83%)
Mutual labels:  svg, heatmap
Vcomponents
VComponents is a SwiftUI framework that contains 40+ customizable UI components
Stars: ✭ 117 (-2.5%)
Mutual labels:  component
React Timer Hook
React timer hook
Stars: ✭ 118 (-1.67%)
Mutual labels:  component
Tabler Icons
A set of over 1400 free MIT-licensed high-quality SVG icons for you to use in your web projects.
Stars: ✭ 10,858 (+8948.33%)
Mutual labels:  svg
React Native Svg Animations
SVG Animations wrapper for react-native.
Stars: ✭ 117 (-2.5%)
Mutual labels:  svg
Rebirth Ng
rebirth-ng is a ui framework for Angular & bootstrap.
Stars: ✭ 118 (-1.67%)
Mutual labels:  component
Apexcharts.js
📊 Interactive JavaScript Charts built on SVG
Stars: ✭ 10,991 (+9059.17%)
Mutual labels:  svg
Snap.svg.zpd
A zoom/pan/drag/rotate plugin for Snap.svg (useful for view only)
Stars: ✭ 119 (-0.83%)
Mutual labels:  svg
X6
🚀 JavaScript diagramming library that uses SVG and HTML for rendering.
Stars: ✭ 2,686 (+2138.33%)
Mutual labels:  svg
Vue Weather
基于vue.js 2.0的天气应用demo
Stars: ✭ 116 (-3.33%)
Mutual labels:  svg
Facesjs
A JavaScript library for generating vector-based cartoon faces
Stars: ✭ 119 (-0.83%)
Mutual labels:  svg
Vue Datatables Net
Vue jQuery DataTables.net wrapper component
Stars: ✭ 119 (-0.83%)
Mutual labels:  component
React Spring Slider
A slider component for react
Stars: ✭ 118 (-1.67%)
Mutual labels:  component

vue-calendar-heatmap

npm npm vue2

A lightweight calendar heatmap Vuejs component built on SVG, inspired by github's contribution calendar graph. With vertical mode, tooltip powered by v-tooltip.

Table of contents

Installation

npm install --save vue-calendar-heatmap

Default import

Global Install:

import Vue from 'vue'
import VueCalendarHeatmap from 'vue-calendar-heatmap'

Vue.use(VueCalendarHeatmap)

Use specific components:

import Vue from 'vue'
import { CalendarHeatmap } from 'vue-calendar-heatmap'

Vue.component('calendarHeatmap', CalendarHeatmap)

or in a parent components .vue file

<script>
  import { CalendarHeatmap } from 'vue-calendar-heatmap'

  export default {
    components: {
      CalendarHeatmap
    },
    // ...
  }
</script>

⚠️ A css file is included when importing the package. You may have to setup your bundler to embed the css in your page.

Distribution import

Global Install:

import 'vue-calendar-heatmap/dist/vue-calendar-heatmap.css'
import VueCalendarHeatmap from 'vue-calendar-heatmap/dist/vue-calendar-heatmap.common'

Vue.use(VueCalendarHeatmap)

Use specific components:

import 'vue-calendar-heatmap/dist/vue-calendar-heatmap.css'
import { CalendarHeatmap } from 'vue-calendar-heatmap/dist/vue-calendar-heatmap.common'

Vue.component('calendarHeatmap', CalendarHeatmap)

⚠️ You may have to setup your bundler to embed the css file in your page.

Browser

<link rel="stylesheet" href="vue-calendar-heatmap/dist/vue-calendar-heatmap.css"/>

<script src="vue.js"></script>
<script src="vue-calendar-heatmap/dist/vue-calendar-heatmap.browser.js"></script>

The plugin should be auto-installed. If not, you can install it manually with the instructions below.

Install all the components:

Vue.use(VueCalendarHeatmap)

Use specific components:

Vue.component('calendarHeatmap', VueCalendarHeatmap.CalendarHeatmap)

Usage

Availables props

values - values - required

Array of objects with date and count keys. date values can be a date parseable string, a millisecond timestamp, or a Date object. count value should be a number.

 <calendar-heatmap :values="[{ date: '2018-9-22', count: 6 }, ...]" ... />

endDate - end-date - required

Can be a date parseable string, a millisecond timestamp, or a Date object. The calendar will start automatically one year before this date.

 <calendar-heatmap :end-date="2018-9-22" ... />

rangeColor - range-color

Array of 6 strings which represents the colors of the progression.

  • The color at rangeColor[0] will always represent the values for a count: null
  • The color at rangeColor[1] will always represent the values for a count: 0
  • The others are automatically distributed over the maximum value of count, unless you specify max props.

Default value is equal to the example.

 <calendar-heatmap :range-color="['ebedf0', 'dae2ef', '#c0ddf9', '#73b3f3', '#3886e1', '#17459e']" ... />

max - max

Any number which should be the max color.

 <calendar-heatmap :max="10" ... />

noDataText - no-data-text

Tooltip text to display on days without data. null by default (shows no tooltip at all).

 <calendar-heatmap :no-data-text="no data for this day" ... />

tooltip - tooltip

Boolean for enable/disable tooltip on square hover. true by default.

 <calendar-heatmap :tooltip="false" ... />

tooltipUnit - tooltip-unit

String representing heatmap's unit of measure. Value is "contributions" by default.

 <calendar-heatmap tooltip-unit="stars" ... />

vertical - vertical

Boolean to switch to vertical mode. false by default.

 <calendar-heatmap :vertical="true" ... />

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].