Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Dataview parsing I think #379

Open
LordMartron94 opened this issue Jul 13, 2024 · 0 comments
Open

Issue with Dataview parsing I think #379

LordMartron94 opened this issue Jul 13, 2024 · 0 comments

Comments

@LordMartron94
Copy link

Why does this not work?:

searchType: frontmatter, dvField, dvField
searchTarget: Date, ToSleepCalc, AwakeCalc

xDataset: 0

datasetName: Date, ToSleep, Awake
dateFormat: iso-8601

folder: "4500 Data Tracking/Sleep"
fixedScale: 0.8

line:
title: To Sleep & Awake Times over Time
fillGap: true
lineColor: yellow, yellow, red
yMin: 4

xAxisLabel: Date

yAxisLocation: left, left, left
yAxisLabel: ToSleep, Awake
yAxisUnit: hours

showLegend: true

Note referencing:


tags:

  • sleep-log
    Date: 2024-07-13
    Sound: true
    Caffeine: true
    Routine:
    Incentive:
    Bed Space: true
    Light: true
    Exercise:
    Devices: true
    Napping: true
    Consistency: true
    Total Sleep (Hr): 8
    Total Sleep (Min): 49
    Sleep Efficiency: 96%
    Resting HR: 60
    Sleep Score: 87
    REM Sleep (Hr): 2
    REM Sleep (Min): 2
    Light Sleep (Hr): 4
    Light Sleep (Min): 45
    Deep Sleep (Hr): 2
    Deep Sleep (Min): 1
    To Sleep (Hr): 11
    To Sleep (Min): 48
    Awake (Hr): 8
    Awake (Min): 57
    Avg. Blood Oxygen: 98

SleepCalc:: $= Math.round((dv.current().file.frontmatter["Total Sleep (Hr)"] + (dv.current().file.frontmatter["Total Sleep (Min)"] / 60)) * (10 ** 2)) / (10 ** 2)
ToSleepCalc:: $= Math.round((dv.current().file.frontmatter["To Sleep (Hr)"] + (dv.current().file.frontmatter["To Sleep (Min)"] / 60)) * (10 ** 2)) / (10 ** 2)
AwakeCalc:: $= Math.round((dv.current().file.frontmatter["Awake (Hr)"] + (dv.current().file.frontmatter["Awake (Min)"] / 60)) * (10 ** 2)) / (10 ** 2)
DateC:: $= dv.current().file.frontmatter["Date"]

[[4500 Data Tracking/Sleep/13 July 2024]]

Output:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant