I'm trying to create a graph with a local data filter pre-added to it. To save a bit of time I'm also ordering the filter elements by count. I want the graph to look like this initially. As you can see the local data filter is there, and it's outline box is closed.
When you open the local data filter this is what you should see. Notice that the items are ordered by count
When I save the script from the first graph this is the code: