All Projects → Zacharysp → Calendarheatmap

Zacharysp / Calendarheatmap

Licence: mit
A calendar based heatmap which presenting a time series of data points in colors.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Calendarheatmap

morpheus.js
JavaScript matrix visualization and analysis
Stars: ✭ 51 (-54.87%)
Mutual labels:  chart, heatmap
Calendar Heatmap
📊 Calendar heatmap graph
Stars: ✭ 170 (+50.44%)
Mutual labels:  calendar, heatmap
Nativescript Ui Feedback
This repository is used for customer feedback regarding Telerik UI for NativeScript. The issues system here is used by customers who want to submit their feature requests or vote for existing ones.
Stars: ✭ 110 (-2.65%)
Mutual labels:  calendar, chart
Dazv
canvas 可视化图表
Stars: ✭ 70 (-38.05%)
Mutual labels:  calendar, chart
Github Spray
Draw on your GitHub contribution graph ░▒▓█
Stars: ✭ 908 (+703.54%)
Mutual labels:  calendar, heatmap
reactjs-calendar-heatmap
React component for d3.js calendar heatmap graph
Stars: ✭ 128 (+13.27%)
Mutual labels:  calendar, heatmap
Reaviz
📊 Data visualization library for React based on D3
Stars: ✭ 215 (+90.27%)
Mutual labels:  chart, heatmap
simple-d3-heatmap
A javascript module to create heatmap calendars
Stars: ✭ 24 (-78.76%)
Mutual labels:  calendar, heatmap
Vue World Map
A Vue JS component for displaying dynamic data on a world map.
Stars: ✭ 33 (-70.8%)
Mutual labels:  chart, heatmap
Calendar Heatmap
Calendar heatmap with matplotlib and random data
Stars: ✭ 76 (-32.74%)
Mutual labels:  calendar, heatmap
Clj Xchart
XChart wrapper for Clojure
Stars: ✭ 105 (-7.08%)
Mutual labels:  chart
Pylunarcalendar
简介:无需数据库,以《钦定协纪辨方书》为核心的python3 农历、黄历、二十四节气、节假日、星次、每日凶煞、每日值神、建除十二神、每日宜忌、彭祖百忌、每日五行、二十八星宿、天干地支、生辰八字、时辰凶吉等开源项目。背景: 由于三体运动(主要地球、太阳、月球)无法准确预测,目前二十四节气依然还是靠天文台观测,Yovey使用传说中[Y*D+C]-L 寿星通用公式 方法实际有很多天数不准,def getSolarTerms(_date)12个if嵌套判断让代码变得十分冗余,由简书网友“大咖_247c”首先发现计算不准问题……
Stars: ✭ 106 (-6.19%)
Mutual labels:  calendar
Android Ratingreviews
Simple star rating system bars, a view similar to the ones seen on Google Playstore. ⭐🌟✨
Stars: ✭ 110 (-2.65%)
Mutual labels:  chart
Ummalqura Calendar
Implementation of java.util.Calendar for the Umm Al-Qura calendar system.
Stars: ✭ 104 (-7.96%)
Mutual labels:  calendar
Pg Calendar
📆 beautiful and eidetic date picker
Stars: ✭ 109 (-3.54%)
Mutual labels:  calendar
Vue Css Donut Chart
Lightweight Vue component for drawing pure CSS donut charts
Stars: ✭ 104 (-7.96%)
Mutual labels:  chart
Laravel Dashboard Chart Tile
Create all the charts you want for your laravel dashboard
Stars: ✭ 102 (-9.73%)
Mutual labels:  chart
D3.chart.sankey
Reusable D3 Sankey diagram using d3.Chart
Stars: ✭ 103 (-8.85%)
Mutual labels:  chart
Btrfs Heatmap
Visualize the layout of data on your btrfs filesystem over time
Stars: ✭ 110 (-2.65%)
Mutual labels:  heatmap
Calendarx
📅 Your go-to, prescribed, Calendar component for React
Stars: ✭ 110 (-2.65%)
Mutual labels:  calendar

Calendar Heatmap

CalendarHeatmap Title

CI Status Version License Platform

example

Introduction

CalendarHeatmap is a calendar based heatmap which presenting a time series of data points in colors, inspired by Github contribution chart, and written in Swift.

Installation

CalendarHeatmap is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'CalendarHeatmap'

CalendarHeatmap is also availabele through Carthage, by adding it to your Cartfile:

github "Zacharysp/CalendarHeatmap"

And finally CalendarHeatmap can also be installed using the Swift Package Manager:

Usage

// minimum usage.
let startDate = Date()
let calendarHeatmap = CalendarHeatmap(startDate: startDate)
calendarHeatmap.delegate = self
view.addSubview(calendarHeatmap)
// provide a range of date.
let formatter = DateFormatter()
formatter.dateFormat = "yyyy-MM-dd"
let startDate = formatter.date(from: "2019-10-18")
let endDate = formatter.date(from: "2020-02-14")
// default endDate is now.
let calendarHeatmap = CalendarHeatmap(startDate: startDate, endDate: endDate)
// you could custom the heatmap by using CalendarHeatmapConfig.
let config = CalendarHeatmapConfig()
let calendarHeatmap = CalendarHeatmap(config: config, startDate: Date())
// reload the heatmap
let calendarHeatmap = CalendarHeatmap(startDate: ...)
calendarHeatmap.reload()
// reload with new range of date.
calendarHeatmap.reload(newStartDate: ..., newEndDate: ...)

CalendarHeatmapConfig details.

Config Key Type Default
backgroundColor UIColor UIColor.white
contentRightInset CGFloat 60
itemColor UIColor UIColor.clear
itemSide CGFloat 20
interitemSpacing CGFloat 4
lineSpacing CGFloat 4
weekDayColor UIColor UIColor.black
weekDayStrings [String] DateFormatter().shortWeekdaySymbols.map{ \$0.capitalized }
weekDayFont UIFont UIFont.systemFont(ofSize: 12, weight: .medium)
weekDayWidth CGFloat 30
weekDayStandard Enum USandCanada
monthColor UIColor UIColor.black
monthStrings [String] DateFormatter().monthSymbols
monthFont UIFont UIFont.systemFont(ofSize: 12, weight: .medium)
monthHeight CGFloat 20

Starts Monday or Sunday.

var config = CalendarHeatmapConfig()
config.weekDayStandard = .USandCanada // starts Sunday. (default)
config.weekDayStandard = .International // starts Monday

Scroll the calendar programmatically

calendarHeatMap.scrollTo(date: Date(...), at: .right, animated: false)

Make your ViewController adopts CalendarHeatmapDelegate

// color for date
func colorFor(dateComponents: DateComponents) -> UIColor {
    guard let year = dateComponents.year,
        let month = dateComponents.month,
        let day = dateComponents.day else { return .clear}
    // manage your color based on date here
    let yourColor = {...}
    return yourColor
}

// (optional) selection at date
func didSelectedAt(dateComponents: DateComponents) {
    guard let year = dateComponents.year,
    let month = dateComponents.month,
    let day = dateComponents.day else { return }
    // do something here
}

// (optional) notify finish loading the calendar
func finishLoadCalendar() {
    // do something here
}

Demo

Take a look at Example, to run the example project, clone the repo, and run pod install from the Example directory first.

Author

Zacharysp, [email protected]

License

CalendarHeatmap is available under the MIT license. See the LICENSE file for more info.

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].