1.7 KiB
1.7 KiB
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
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
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
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"