mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
Updated Weight tracker (markdown)
parent
ab6e71850b
commit
b4abcfe659
@ -21,12 +21,12 @@ To get an idea of the script, here's the "JS code" note content:
|
||||
```javascript
|
||||
async function getChartData() {
|
||||
const days = await api.runOnBackend(async () => {
|
||||
const notes = await api.getNotesWithLabel('weight');
|
||||
const notes = api.getNotesWithLabel('weight');
|
||||
const days = [];
|
||||
|
||||
for (const note of notes) {
|
||||
const date = await note.getLabelValue('dateNote');
|
||||
const weight = parseFloat(await note.getLabelValue('weight'));
|
||||
const date = note.getLabelValue('dateNote');
|
||||
const weight = parseFloat(note.getLabelValue('weight'));
|
||||
|
||||
if (date && weight) {
|
||||
days.push({ date, weight });
|
Loading…
x
Reference in New Issue
Block a user