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

Summary cannot display in a line graph?

Open EgnaroJQ opened this issue 1 year ago • 1 comments
trafficstars

I tried to add summary to a line graph but it failed to display. My code is as below:

searchType: frontmatter 
searchTarget: Workout (min) 
folder: 00 Diary 
startDate: 2024-02-12 
line: 
	title: Workout(min)
summary:			
	template: "Total: {{sum()}} hours"

Did I write something wrong? Or summary cannot show in a line graph?

EgnaroJQ avatar Feb 15 '24 14:02 EgnaroJQ

I think you can only use a single tracker per chart - you have to decide if you want to use a summary or a line chart. The summary displays a single line of text, no chart, so you can add the summary before (or after) the actual chart:

Summary:

searchType: frontmatter 
searchTarget: Workout (min) 
folder: 00 Diary 
startDate: 2024-02-12 
summary:			
	template: "Total: {{sum()}} hours"

Details:

searchType: frontmatter 
searchTarget: Workout (min) 
folder: 00 Diary 
startDate: 2024-02-12 
line: 
	title: Workout(min)

stracker-phil avatar Feb 21 '24 13:02 stracker-phil

@stracker-phil is correct. You need to do 2 separate dataview blocks

lazyguru avatar Feb 27 '24 01:02 lazyguru