Activity Graph
approvedby rwyattwalker
This plugin has not been manually reviewed by Obsidian staff. Render activity heatmaps from Dataview query results.
↓ 106 downloadsUpdated 1mo ago0BSD
Activity Graph
Render a GitHub-style activity heatmap from Dataview queries. Use Dataview queries directly with optional query level setting overrides.
Requirements
- Obsidian
- Dataview plugin enabled
Basic usage
Use an activity-graph code block containing a Dataview query:
TABLE file.day AS date, 1 AS value
FROM "Daily"
SORT file.day ASC
Query requirements
Your Dataview query must return:
date: a date value (Dataview date,file.day, or an ISO date string likeYYYY-MM-DD)value: a number (for intensity; use1for binary activity)
Examples
Count files (binary activity):
TABLE date(file.name) AS date, 1 AS value
FROM "Exercise Logs"
Track a numeric field:
TABLE file.day AS date, duration AS value
FROM "Exercise Logs"
Per-query overrides
Add a --- block after the query:
TABLE file.day AS date, duration AS value
FROM "Exercise Logs"
---
title: Exercise
daysToShow: 90
showLegend: false
colorGradient: purple
minValue: 0
maxValue: 3
lessLabel: 0
moreLabel: 3+
Supported overrides:
- title
- daysToShow
- showMonthLabels
- showWeekdayLabels
- showLegend
- startWeekOnMonday
- colorGradient
- lessLabel
- moreLabel
- minValue
- maxValue
Notes
- The graph ends on today's date (local time) and shows
daysToShowdays backwards. - Overrides are plain
key: valuelines following a---. - Supported gradients:
green,blue,purple,orange,red, plus any custom palettes you add in settings (default:green). minValue/maxValuelet you lock the heatmap scale; leave blank in settings (or omit in overrides) to keep it relative.- The following css snippet can be added to allow more space for the graph, can look squished otherwise:
body { --file-line-width: 1000px; }
Upcoming Features
- Custom date range (currently only supports today - X days)
- If you have a desired feature, let me know!
Screenshots
Query
Result
Default Color Pallets
Green
Blue
Purple
Orange
Red
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.