Vision Sparkline trend Disable

Is there any way of setting the Vision Sparkline to disabled, i want to make a Sparkline on a template that passes a indirect tag path for the taghistory but only want it to run if the template is visible or if the tag isn’t dead mostly for when developing the site dont want to be pestered with 200 error messages cause the tag isnt in the historian yet. Currently running Version 8.1.51

Want what to run? ...a script on the sparkline component? ...a binding on the data property?

Yeah—by “run” I meant the tag history binding on the Sparkline, not a script.

The issue I ran into is:

  • Vision doesn’t stop bindings/events based on component visibility

  • The Sparkline doesn’t have an enabled/disabled property to control its polling

So even when the template isn’t showing the Sparkline (just the base display with name/value/units), it was still trying to evaluate the tag history and throwing errors if the tag didn’t exist yet.

What I ended up doing was passing a blank tag path to the Sparkline when it’s not in use. Since the binding has nothing to evaluate, it effectively stops it from polling.

When the user right-clicks and switches to the version with the Sparkline, I pass the real basePath into it and it starts working normally.