Code Monkey home page Code Monkey logo

Comments (19)

dcoales avatar dcoales commented on June 5, 2024 2

Perfect thank you. I did try it in the tracker block but at the same level as the dateFormat and that just through an error.
All good now though.

Thanks again.

from obsidian-tracker.

pyrochlore avatar pyrochlore commented on June 5, 2024

Do you mind to provide me some example data to do tests?
The pieces of data in the diary you are tracking, not a full note.

from obsidian-tracker.

pyrochlore avatar pyrochlore commented on June 5, 2024

You can also send a direct message to me on discord Obsidian Member Group if you want.

from obsidian-tracker.

pyrochlore avatar pyrochlore commented on June 5, 2024

Here is a zip file containing the test files working on my side.
Please put the folder 'case' under your vault and see if it works.
Remember to update the plugin before testing it.

from obsidian-tracker.

dcoales avatar dcoales commented on June 5, 2024

Using your zip file I see the following:

image

I've attached a zip file of my own which produces the following - it misses some dates:
image

I don't get labels in either case although your sample does produce the red line at least. No idea why it doesn't in my journals folder.
Test.zip
I'm clearly doing something wrong but can't figure out what it is.

from obsidian-tracker.

pyrochlore avatar pyrochlore commented on June 5, 2024

image
Please check the format of your daily notes' file name.
There are two spaces between 05 and 17, also between 05 and 19.
That should be the reason why the plugin cannot use the specified dateFormat to parse them.

from obsidian-tracker.

dcoales avatar dcoales commented on June 5, 2024

Thanks, I'm an idiot :-)

I've fixed the dates and the chart now looks like:
image
It appears that it won't draw the line between dots if there is a gap. So there is no line between the 17th and 19th. Is there something I can do about that ? I don't run every day so there will always be gaps.

Also I still can't get the labels to appear.

Thanks for your help.

from obsidian-tracker.

pyrochlore avatar pyrochlore commented on June 5, 2024

It's OK. Most of the people may not give it a chance if it works not as expected.

The missing line was caused by the missing point at 2021/05/18.
By default, the plugin will not connect points across missing points for you. (Because you miss it! :p)
To connect them, please add a parameter 'fillGap: true' under 'line:' parameter.

I am not sure why the labels are missing.
The labels showed here even with the unmodified sample you provided.
image
Will do more tests on it.

from obsidian-tracker.

pyrochlore avatar pyrochlore commented on June 5, 2024

I found where the problem is.
The labels are there but not colored right under light theme.
You can check it by switching the theme to dark mode.
Will fix it and release a new version soon.

from obsidian-tracker.

dcoales avatar dcoales commented on June 5, 2024

That's excellent thank you. I've tried adding the fillGap: true line to the YAML but it's having no effect. I may be putting it in the wrong place. I've tried in the YAML at the top of the page i.e. my file looks like:

---
fillGap: true
---

``` tracker
searchType: text
searchTarget: 'Run::.*@(?<value>[\s]*[0-9]+[\.][0-9]*)'
folder: /Test
startDate: 2021 05 17, Mon
dateFormat: 'YYYY MM DD, ddd'
line:
    title: Running Pace
    xAxisLabel: When
    yAxisLabel: Pace
    yAxisUnit: min/km
    lineColor: red

I've upgraded and am using 1.5.0

from obsidian-tracker.

pyrochlore avatar pyrochlore commented on June 5, 2024

Please try this

searchType: text
searchTarget: 'Run::.*@(?<value>[\s]*[0-9]+[\.][0-9]*)'
folder: /Test
startDate: 2021 05 17, Mon
dateFormat: 'YYYY MM DD, ddd'
line:
    title: Running Pace
    xAxisLabel: When
    yAxisLabel: Pace
    yAxisUnit: min/km
    lineColor: red
    fillGap: true

The tracker code block is also a YAML block.
I should call it "tracker block".

from obsidian-tracker.

pyrochlore avatar pyrochlore commented on June 5, 2024

By the way, in version 1.5.0.
You can use the following block.

searchType: dvField
searchTarget: Run
startDate: 2021 05 17, Mon
dateFormat: 'YYYY MM DD, ddd'
line:
    title: Running Pace
    xAxisLabel: When
    yAxisLabel: Pace
    yAxisUnit: min/km
    lineColor: red
    fillGap: true

For multiple values field you mentioned before (Run:: 5.27 @ 6.03)
Try this,
image

from obsidian-tracker.

pyrochlore avatar pyrochlore commented on June 5, 2024

The fix about missing labels in light theme had been released in version 1.5.1.

from obsidian-tracker.

dcoales avatar dcoales commented on June 5, 2024

Wow fantastic. Is it possible to have two yAxis labels - one is the distance the other is the pace ? I know, I know, some people are never satisfied.

from obsidian-tracker.

pyrochlore avatar pyrochlore commented on June 5, 2024

Yes and you already have it.
It works like this

searchType: dvField
searchTarget: Run[0], Run[1]
folder: /Test
startDate: 2021 05 17, Mon
dateFormat: 'YYYY MM DD, ddd'
separator: '@'
line:
    title: Running Pace
    xAxisLabel: When
    yAxisLabel: Distance, Pace
    yAxisUnit: km, min/km
    lineColor: red, yellow
    fillGap: true
    yAxisLocation: left, right

from obsidian-tracker.

dcoales avatar dcoales commented on June 5, 2024

That's brilliant thanks.

from obsidian-tracker.

pyrochlore avatar pyrochlore commented on June 5, 2024

Will close this issue,
Any more questions or feature requests are welcome.
Just fire the issue.

from obsidian-tracker.

dcoales avatar dcoales commented on June 5, 2024

I've the YAML you provided above and added the showLegend: true option but the chart doesn't show legend labels correctly. Is there another option to set the legend lables ?

image

The YAML is:

searchType: dvField
searchTarget: Run[0], Run[1]
folder: /journals
startDate: 2021 05 01, Sat
dateFormat: 'YYYY MM DD, ddd'
separator: '@'
line:
    title: Running Pace
    xAxisLabel: When
    yAxisLabel: Distance, Pace
    yAxisUnit: km, min/km
    lineColor: red, green
    fillGap: true
    yAxisLocation: left, right
	showLegend: true

from obsidian-tracker.

pyrochlore avatar pyrochlore commented on June 5, 2024

Use parameter datasetName

searchType: dvField
searchTarget: Run[0], Run[1]
datasetName: A, B
......

from obsidian-tracker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.