obsidian-tracker icon indicating copy to clipboard operation
obsidian-tracker copied to clipboard

Reference line

Open Gnopps opened this issue 2 years ago • 3 comments

I've got a line chart where I'd like to add a second, static horizontal line at a certain value (e.g. showing 10 throughout). I've been experimenting but haven't found a way to do it. Any ideas?

Below the current chart where I'm trying to add the line.

```tracker
searchType: text
searchTarget: 🍅
folder: /
startDate: -6d
endDate: 0d
accum: true
penalty: 0
fitPanelWidth: true
line:
	showLine: true
	yAxisLabel: Nbr
	xAxisLabel: Date
	yMin: 0
	fillGap: true
```

Gnopps avatar Mar 24 '22 07:03 Gnopps

You can put another search target in that is named reference_line, and you add that reference line in every note that you have the tomato in. Make sure to also name the sets using xdatasetname: tomato, reference. The way tracker distinguishes between lines in each setting is with a comma. So Color: line1color, line2color.

Cityjohn avatar Apr 05 '22 08:04 Cityjohn

Thanks for your suggestion! I experimented a bit using your suggestion and realised I could use the penalty value in a separate dataset as reference. so final code is:

```tracker
searchType: text, dvField
searchTarget: 🍅, ignore
datasetName: pomodoros, reference
folder: /
startDate: -6d
endDate: 0d
accum: true, false
penalty: 0, 10
fitPanelWidth: true
line:
	showLine: true
	yAxisLabel: Nbr
	xAxisLabel: Date
	showPoint: true, false
	yMin: 0
	fillGap: true
	lineColor: black, yellow
```

Output: image

Gnopps avatar Apr 06 '22 07:04 Gnopps

Niiice, now I get what you were trying to do haha. This is actually really good on a studying schedule, Thank you!

Cityjohn avatar Apr 06 '22 10:04 Cityjohn