Easy chart pen names from tag tree

Hi all
In version 7.7.x there is this nice new feature to drag tags from the tags tree view into an easy chart.
that is all good and well until you have tags that are part of a UDT.
e.g. the udt motor has a tag within it call amps.
the amps are set to log into history setup.
Problem 1:
Now if i drag the “motor 1” UDT instance onto the graph nothing gets trended as its not the tag with history but it does let me add it to the easy chart.
Problem 2:
If i drag the sub tag Amps from the “motor 1” udt instance onto the graph it trends and all is good and well. However, the pen name is Amps. If i drag another Amps from another motor instance i now can not distinguish between the 2. properly

So my question is:
Is there a way to use the script or extension function to:
add the tag with the pen name based on the udt_instance_name.subtag
e.g. motor1.Amps if the tag is part of a udt instance?
OR
if i add a udt instance to the graph add all historical tags to the trend within the udt to it based on naming convention above.

I know its a lot to ask for

Also different question is there an easy way to get standard deviation from a tag on that easy chart?

Again thank you for your help in advance.

Hi,

This was brought up to us at the ICC by another user. We have a ticket planned for 7.7.2 to add an extension function to generate the name, at least, and will take a look at better UDT support as well.

Regards,

Ignition is an awesome product. I always feel funny finding issues, but:
Any progress here?
This is very confusing to my users and thus limits my ability to use ad-hoc Easy Charts.
Thanks!

The easy chart got an onTagsDropped extension function, which allows you to customize the new pen names when they’re dropped onto the chart:

tagPens = self.tagPens
     
for tag in paths:
    tagPath = tag.replace("default", "~")
    splitTag = tag.split("/")
    name = splitTag[-1].replace("_", " ")
         
    newRow = [name, tagPath, "MinMax", "Default Axis", 1, 1, system.gui.color(255, 85, 85, 255), "", 1, 1, 0, 1, 0, "", 0, 0, 0, 1, 0, 0]
         
    self.tagPens = system.dataset.addRow(tagPens, newRow)
2 Likes

This was solved by offering the onTagsDropped extension function on the EasyChart. It allows you to do anything you want with a dropped tag. See this older topic:

2 Likes