Page 1 of 1

I'm missing something - graph png in a control page

PostPosted: Fri Sep 17, 2021 10:47 am
by sjoing
I've been scouring the user manual trying to find the part where Indigo control pages are creating that use Matplotlib graph png files - but I can't find that. My problem is that the graph png file doesn't get updated by the Indigo control page because I have to insert it as a 'Static Image / Caption'. So when I go to Safari and view this control page, other items will refresh such as device controls, but the Matplotlib graph png file will not. If I refresh the page manually it loads the latest graph, of course, but that's not the workflow I'm looking for. I feel like I'm missing some part of the big picture regarding how to use the png files that Matplotlib generates. Thank you in advance for any help.

Re: I'm missing something - graph png in a control page

PostPosted: Fri Sep 17, 2021 12:58 pm
by DaveL17
If you leave the control page displayed, the chart won't change because it's loaded as a static image. That's true.

If you want to leave the same page displayed and have the freshest version of the chart always visible, you should add it to the page as a Refreshing Image URL object and point to the file specifically.
Code: Select all
file:///Library/Application Support/Perceptive Automation/Indigo 2021.1/Web Assets/images/controls/static/FILENAME.png
The downside to this approach is that these links will break when your Indigo version is updated. Therefore, if you choose to go with the Refreshing Image URL approach, it's best to save the images to a location that is independent of the Indigo version (a location that you control) such as
Code: Select all
file:///Users/USERNAME/Pictures/FILENAME.png
or something to that effect.

Re: I'm missing something - graph png in a control page

PostPosted: Fri Sep 17, 2021 12:58 pm
by DaveL17
p.s. I will update the plugin wiki to provide this information to help others. Thanks for brining it up!

Re: I'm missing something - graph png in a control page

PostPosted: Fri Sep 17, 2021 4:12 pm
by sjoing
Thank you Dave! I had tried 'Refreshing Image URL' previously, but the file// prefix to the path was the trick I was missing.

Re: I'm missing something - graph png in a control page

PostPosted: Fri Sep 17, 2021 4:21 pm
by DaveL17
Glad to hear that you were able to get it to work!