Easy Chart won't display historical data

I’ve noticed that some of my EZCharts do not show any data whatsoever. The tags in question do refer to tags on a different provider than “default”, but binding the historized tag to a regular Chart works fine. However, dragging and dropping a tag from the new tag provider to EZChart doesn’t seem to make the “connection”. Here’s ascreen shot of data in the Chart and a big blank in EZChart…


EZChart tagpens:

Chart data binding:

What am I missing?

As a FYI, for anyone who might be wondering - I escalated this to Ignition support and they were able to replicate the problem, I’m using 7.9.7 and they also replicated it on 7.9.8. The problem: On either Easy Chart or the “regular” Chart component, dragging and dropping tags from a non-default tag provider (in my case a Tag Driving Provider that I added) doesn’t work. It appears to add the tag, it doesn’t throw any errors, there just isn’t any data displayed! For either charting component, if you add the tags manually, it works just fine. So,it’s not a big problem unless you want to allow the user to do some ad hoc charting using the tag tree component. Dragging and dropping tags from the “default” memory based provider works just fine, but dropping tags from other providers won’t yield any results.
I’ll post any solutions/workarounds here as we work through this.

Hi, I’ve been having an issue that I’ve been working with support on for a few weeks regarding data not displaying correctly in the easy chart component under some slightly different circumstances. That said, I would like you to try something and report back the results. After dragging a tag to the easy chart component (where it does not display the data) do the following:

  1. Save the project
  2. Go to gateway configuration
  3. In the left menu under “Tags” select “History”
  4. Click “Edit” next to the tag history provider that you are working with
  5. When the parameters for the tag history provider is displayed, don’t edit anything, just scroll to the bottom and click “save”
  6. move the time scale on the easy chart component (or take some other action that causes it to reload data) and see if any data is shown
  7. Report back whether this causes data to be displayed or not

Thank you,

Nope…. I followed each instruction exactly and no data is displayed. for #6, I unselected the pen, clicked Apply, re-selected it, hit Apply, moved the timeline, etc … nothing
It does add the axis on the right when selected, but the autoscaling comes up with 0.0 – 1.0, whereas if it had any data at all to work with, it would be 0.0-10.
Sorry

Consider comparing the difference you get in the tagPens dataset when dragging and dropping the pen (doesn’t work) versus manually adding the pen in the customizer (does work). Feel free to show the two versions here (the text form of the datasets, from the dataset editor’s copy-to-clipboard button).

A solution - or at least a workaround that works quite well was discussed with Ignition Support - is to put a script in onTagsDropped extension.

HOWEVER - my first try, using the example in the manual, didn’t work as is - turns out the tagPath needs a “/.” in order for it to work any differently that the usual drag and drop (i.e. in my case, to work at all!) See Tylers’s final tweak to the above code which now works great.

Randall, I would use the onTagDropped extension function of the Easy Chart. If you drag a tag onto the chart vs adding a pen through the customizer, those pens should have different tag paths. You’ll have to match the one that is added through the customizer. You can use tag.replace() in order to change the tagpath that is being passed into the tag pens dataset. For example:

tagPath = tag.replace("[Driving_Provider]", “[/.Driving_Provider]”)

Then add that tagPath variable to your new row for the tag pens dataset.

Regards,
Tyler
Support Services Engineer
Inductive Automation

So the final, working chart component onTagDropped script wound up to be:

    tagPens = self.tagPens
	for tag in paths:
	    #add a /. to make it look like it was added manually..
	    tagPath = tag.replace("[RPMTagProvider]", "[/.RPMTagProvider]")  
	    splitTag = tag.split("/")
	    name = splitTag[-1].replace("_", " ")
	    penNumber = tagPens.getRowCount()     #this number will get bigger as tags are dropped
	    thisPenColor = self.autoColorList[penNumber]  #grab a new color
	    newRow = [name, tagPath, "MinMax", "Default Axis", 1, 1, thisPenColor, "", 1, 1, 0, 1, 0, "", 0, 0, 0, 1, 0, 1]
	         
	    self.tagPens = system.dataset.addRow(tagPens, newRow)

That will break if you drop more than one tag. The loop should assign to the method-local tagPens (last line inside the loop), and then that should be assigned to self.tagPens after the loop.

Here’s a more general onTagsDropped implementation that 1. doesn’t care what your tag provider is named and 2. won’t blow up if you drop more pens than exist in the auto color list:

	import re
	#Set up the pen defaults. 
	default = ['DefaultName', # name
	'[~]DefaultPath', # tag_path
	'MinMax', # aggregation_mode
	'Default Axis', # axis
	1, # subplot
	True, # enabled
	"color(255,0,0,255)", # color
	'', # dash_pattern
	1, # render_style
	1.0, # line_weight
	0, # shape
	True, # fill_shape
	False, # labels
	'', # group_name
	False, # digital
	False, # override_autocolor
	False, # hidden
	True, # user_selectable
	None, # sort_order
	True] # user_removable
	
	tagpens = self.tagPens
	for path in paths:
		newrow = default
		newrow[0] = path.split('/')[-1]
		newrow[1] = re.sub(r'\[(.*)\]', r'[/.\g<1>]', path)
		newrow[6] = self.autoColorList[tagpens.rowCount % len(self.autoColorList)]
		tagpens = system.dataset.addRow(tagpens, tagpens.rowCount, newrow)
		
	self.tagPens = tagpens
2 Likes

excellent points… thank guys! ( I was just happy that it worked at all! :wink: )

The workaround of manual tag editing works, as evidenced in this video

This is still an issue in 2023 latest version. We as the users should not have to add script for some basic functionality that should already exist and as evidenced in this thread, has already been figured out by the dev team.

The above 'onTagsDropped' script did not work for my project.

Why are you complaining to us? This forum, while visited regularly by some IA staff, is populated by other users. Open a support ticket and complain directly to IA, please.

Just checking if anyone is awake. You Sir, Mr. Turmel are invaluable on this forum.

My fix for the above issue was because the Historian Tag provider name is not default and the above script did not assign the correct name. Which in my case is "[Edge Historian/edge]"