vault backup: 2025-12-10 11:37:35
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
|
||||
```dataviewjs
|
||||
const noteDay = dv.current().file.day
|
||||
const pages = dv.pages('"Journal/Privat"')
|
||||
.where(p => p.file.day > dv.date("today") - dv.duration("3 months"))
|
||||
.where(p => p.file.day <= dv.date("today"))
|
||||
.sort(p => p.file.name, 'asc')
|
||||
const daten = pages.map(p => p.file.name).values
|
||||
const gewichte = pages.map(p => p.weight).values
|
||||
|
||||
const chartData = {
|
||||
type: 'line',
|
||||
time: 'day',
|
||||
data: {
|
||||
labels: daten,
|
||||
datasets: [{
|
||||
label: 'kg',
|
||||
data: gewichte,
|
||||
backgroundColor: [
|
||||
'rgba(255, 99, 132, 0.2)'
|
||||
],
|
||||
borderColor: [
|
||||
'rgba(255, 99, 132, 1)'
|
||||
],
|
||||
borderWidth: 1,
|
||||
spanGaps: true
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
||||
window.renderChart(chartData, this.container)
|
||||
```
|
||||
|
||||
> [!info]+ Werte über den gesamten Zeitraum
|
||||
>```tracker
|
||||
>searchType: frontmatter
|
||||
>searchTarget: weight
|
||||
>dateFormat: YYYY-MM-DD
|
||||
>folder: Journal/Privat
|
||||
>summary:
|
||||
> template: "Minimum: {{min()}}kg\nMaximum: {{max()}}kg\nMedian: {{median()}}kg\nAverage: {{average()}}kg"
|
||||
>```
|
||||
|
||||
> [!info]+ Werte über das letzten sechs Monate
|
||||
>```tracker
|
||||
>searchType: frontmatter
|
||||
>searchTarget: weight
|
||||
>dateFormat: YYYY-MM-DD
|
||||
>folder: Journal/Privat
|
||||
>startDate: -6M
|
||||
>endDate: 0d
|
||||
>summary:
|
||||
> template: "Minimum: {{min()}}kg\nMaximum: {{max()}}kg\nMedian: {{median()}}kg\nAverage: {{average()}}kg"
|
||||
>```
|
||||
|
||||
> [!note]+ Weight Log
|
||||
>```tracker
|
||||
>searchType: frontmatter
|
||||
>searchTarget: weight
|
||||
>dateFormat: YYYY-MM-DD
|
||||
>folder: Journal/Privat
|
||||
>startDate: -6M
|
||||
>endDate: 0d
|
||||
>fitPanelWidth : false
|
||||
>line:
|
||||
> title: Weight Log
|
||||
> yAxisLabel: Weight
|
||||
> yAxisUnit: kg
|
||||
> showPoint: false
|
||||
> fillGap: true
|
||||
> lineColor: "#b16286"
|
||||
>```
|
||||
Reference in New Issue
Block a user