Making graph legend labels in obsidian-tracker

Things I have tried

after typed “showLegend: true”, i have tried legendTitle, legendLabel, ect…

What I’m trying to do

make labels in my legend have the actual labels. right now, it says that every line color is “untitled” and i don’t know how to add labels.

What are you using to make these graphs? “charts” “obsidian-tracker” … ? (There are a bunch of others; I do not know all the names.)

i’m using obsidian-tracker

Looking at the documentation for input parameters for obsidian-tracker, I suspect that datasetName is what is actually making the legend labels. For each searchTarget in your graph, make sure you also have set a datasetName.

The page I linked before also shows which “legend”-related options exist. Good luck!

oh this helped, thanks! do you also know how to change the size of the graph to allow the full legend to be shown?

1 Like

It looks like there are settings for “legendPosition” and “legendOrientation” - I do not know if either of those would help. To make the whole graph bigger there are “fitPanelWidth”, “fixedScale” and “margin” parameters which all go before the graph type. I like setting fitPanelWidth: true for my line graphs, maybe that will work for you?