Hello, I'm writing a script to generate several charts and export them to a specified folder, but I'm unable to save them in the format that I desire.
I have a control chart that I want to export to a directory specified by the user. Ideally, I would like the chart to save with no chart header, i.e., just the graphic with no text, like this:

I'm using the following line of code to save the chart to a directory:
(resultsChart << Child) << Save Picture ("C:\Folder\results.jpg", JPEG );
However, this code saves the chart with a header and footer, which I don't want:

What else I've tried:
Adding another << Child argument to the script does not change the output.
((resultsChart << Child) << Child) << Save Picture ("C:\Folder\results.jpg", JPEG );
Saving the chart as HTML almost gives me the results I want, but not quite.
(resultsChart << Child) << Save HTML ("C:\Folder\results.html" );This line of code will create a folder in the specified directory called gfx. This folder contains all the charts I need in the format I want, with no headers or footers, but I don't like this solution for several reasons:
- The script saves a bunch of extra files that I don't need (i.e., the HTML files themselves)
- I don't want to create a new subfolder in the directory I'm trying to save to. I'd rather be able to export my charts directly where I want them to go.
- I want to be able to name my files when I export them, but the file names in gfx seem to be hard-coded.
Any guidance is appreciated. Thank you!