November 4, 2022, 10:34am
Use case or problem
While using the Graph View, I’m constantly hitting the “Restore default settings” button by accident, when I simply want to close the settings box. This causes me to loose all my groups constantly. After a few times, it gets really frustrating to recreate.
(Most favorable solution) Move the Groups out of the settings box. Compared to all the other settings, Groups doesn’t seem like something you would want to reset, intuitively. Move the restore button away from the close button.
Have a dialog box to confirm that the user wishes to reset the settings.
November 4, 2022, 11:23am
If it helps, you can get / store / set your groups like this. You can save the group settings to a note so you can easily restore or modify them.
Getting your current groups
Put this code into a note to retrieve your current group settings:
const settings = await app.internalPlugins.plugins.graph.loadData()
dv.paragraph('```json\n' + JSON.stringify(settings.colorGroups, null, 2) + '\n```')
It will show you something like this:
Take a note of the
Updating the groups
Take the code below and put it into a note. It will update all your graph groups to be the two groups specified,
const graph = app.internalPlugins.plugins.graph
const settings = await graph.loadData()
settings.colorGroups = [
If you follow the structure inside the
settings.colorGroups section, you can update the groups as you wish.
Create a couple of different notes with the groups that you want, and just load one of the notes to change all your groups.
Put the code in a Templater script and launch it from a hotkey.
Before/when it happens again …
In your vault in your file explorer there is a folder called:
… depending on your file system you may have to enable "show hidden files’ to see it.
In that folder the file …
has all your graph settings.
When happy with your settings copy & paste that file somewhere safe so that you can paste it back in should you ever lose your settings again.
November 19, 2022, 3:59pm
Thank you. It’s a great help for me to restore my group settings. - Is there also an option to restore my filter settings in Graph View?