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

Current month tracking #394

Open
Scoubines opened this issue Nov 17, 2024 · 7 comments
Open

Current month tracking #394

Scoubines opened this issue Nov 17, 2024 · 7 comments

Comments

@Scoubines
Copy link

Scoubines commented Nov 17, 2024

Hi,

I love this plugin a lot but I'm bumping into an issue. I know someone asked it some time ago but it didn't seem to solve it.
I can't find a way to make a "startDate: Beginning of THIS month" to endDate: "End of this current month" kind of thing.

Basically I have a weight tracker graph that I want to be only showing me current month weight inputs "Poids". Currently I couldn't only find relative parameters such -1M etc...which isn't what I am want.

Any ideas to make it?

Thank you!

Here is my code with > because of the >[!multi-column] snippet

[!INFO] ## Weight evolution for this month

searchType: frontmatter
searchTarget: Poids
folder: 5.Journal/01 Daily
startDate: 30
endDate: 0d
datasetName: Poids
aspectRatio: 2:1
fitPanelWidth: true
ignoreZeroValue: true

line:
  fillGap: true
  yAxisLocation: left
  yAxisLabelColor: yellow
  yAxisColor: ffcc99
  yAxisLabel: Poids
  yAxisLabelColor: yellow
  lineColor: '#ffcc99'
  yMin: 50 # Set minimum weight to 50 kg
  yMax: 70 # Set maximum weight to 70 kg
  lineWidth: 3
  pointSize: 4
  pointColor: '#ffcc99'
  pointBorderWidth: 0
  pointBorderColor: '#25D0F7'
  showLegend: false
@lazyguru
Copy link
Collaborator

lazyguru commented Jan 5, 2025

I believe you can solve this with relative dates? eg:

...
startDate: -1M
...

@MMoMM-org
Copy link

depends on what you want to achieve. @lazyguru is right you can use relative dates.
If you have a note though which you use on different dates and want to see only THIS month it will not work.
e.g. today 10.01.25... -1M will show you everything from 10.12.24 till today if you don't specify the end date.
Only way really is to use hardcoded dates..

@Scoubines
Copy link
Author

@MMoMM-org @lazyguru thank you for your kind inputs!
So that's exactly it, having it set to -1M give me a relative date (today 10.01.25... -1M will show you everything from 10.12.24 till today), which isn't what I mean.

To make it clearer, I open a monthly note which includes a weight graph for the current month (at least that's what I want), and I don't find it super relevant in my case to see any earlier weight tracking from the previous month. For instance, if I track it every day and open my monthly note now on Jan 11th, I should get only the 11th weight displays, and nothing from December. In other terms I'm looking to have a per month analysis of my evolution.
Harcoding it...yeah but then, I lose the point of using Obsidian to automate that^^

Any other tips or tricks I might be missing?

@MMoMM-org
Copy link

If you have a note per month there is an easy workaround for the issue, create a template which will substitute the dates. At least with templater this is easy.
having tracker be able to utilise frontmatter properties would open up a lot of other usage scenarios though

@Scoubines
Copy link
Author

If you have a note per month there is an easy workaround for the issue, create a template which will substitute the dates.
I'm not sure to understand your idea? I do have a note per monthly review but how is this going to help me? Sorry I'm a bit a bit of a newbie 😅

@MMoMM-org
Copy link

If you create the monthly note via Templater you can let Templater hardcode the start and end date.

Don‘t know if templates from the core plugins can do this too.

@Scoubines
Copy link
Author

Oh I see what you mean...good idea! So far I created the notes via the Journals plugins with a single click on the month in the calendar, super convenient; so I will have to do it now via a palette command but not a big deal, maybe add a month button somewhere in the note to make it easier.
Thanks for the iniight!

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

3 participants