obsidian-tracker
obsidian-tracker copied to clipboard
Pie Chart (Total of pie chart = value, not summation of parts)
I want to make a pie chart that UTILIZES the following 2 inputs:
- item-A-Used: which I'm representing in my pie-chart tracker 'data' attribute as '{{sum(dataset(0))}}'
- item-A-LastInventoryCount : which is 'dataset(1)'
Pie chart code that isn't working:
searchType: dvField
searchTarget: item-A-Used, item-A-LastInventoryCount
datasetName: used, total
startDate: 2023-04-30
endDate: 2023-05-06
pie:
title: Item-A used and Remaining
data: '{{sum(dataset(0))}}, WHAT-GOES-HERE??'
dataName: Used, Total Left
dataColor: 'yellow,green'
label: Used, Total Left
extLabel: '{{sum(dataset(0))}}, Total Left'
Things I've tried to put in "WHAT-GOES-HERE??":
- {{(dataset(1))}}-{{sum(dataset(0))}}
- dataset(1)-{{sum(dataset(0))}}
- item-A-LastInventoryCount-{{sum(dataset(0))}}
I'm just not sure how to accomplish the following
- Can I do subtraction of 2 inputs so that I can define the TOTAL size of the pie chart? (otherwise my pie chart ends up being INVENTORY-TOTAL-slice + SUMofINVENTORYused-slice) but I want the 2 slices to add up to the total inventory at last count
Any help appreciated