# Easy chart pen names from tag tree

**URL:** <https://forum.inductiveautomation.com/t/easy-chart-pen-names-from-tag-tree/9115>\
**Category:** Ignition\
**Created:** [September 29, 2014, 6:31pm UTC](https://forum.inductiveautomation.com/t/easy-chart-pen-names-from-tag-tree/9115 "2014-09-29T18:31:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![focus-eng](https://avatars.discourse-cdn.com/v4/letter/f/fbc32d/32.png) [@focus-eng](https://forum.inductiveautomation.com/u/focus-eng)\
**Post date:** [September 29, 2014, 6:31pm UTC](https://forum.inductiveautomation.com/t/easy-chart-pen-names-from-tag-tree/9115/1 "2014-09-29T18:31:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [October 16, 2014, 6:45pm UTC](https://forum.inductiveautomation.com/t/easy-chart-pen-names-from-tag-tree/9115/2 "2014-10-16T18:45:13Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![KA4HRE](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ka4hre/32/42145_2.png) [@KA4HRE](https://forum.inductiveautomation.com/u/KA4HRE)\
**Post date:** [June 20, 2018, 5:28pm UTC](https://forum.inductiveautomation.com/t/easy-chart-pen-names-from-tag-tree/9115/3 "2018-06-20T17:28:52Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 20, 2018, 5:43pm UTC](https://forum.inductiveautomation.com/t/easy-chart-pen-names-from-tag-tree/9115/4 "2018-06-20T17:43:54Z")

</div>

The easy chart got an [`onTagsDropped`](https://docs.inductiveautomation.com/display/DOC79/Easy+Chart) extension function, which allows you to customize the new pen names when they’re dropped onto the chart:

```auto
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)

```

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 20, 2018, 5:44pm UTC](https://forum.inductiveautomation.com/t/easy-chart-pen-names-from-tag-tree/9115/5 "2018-06-20T17:44:10Z")

</div>

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:

> [@Documentation in Tag Browse Tree](http://forum.inductiveautomation.com/t/documentation-in-tag-browse-tree/9867):
>
> I am using the ‘tag browse tree’ object to allow dragging/dropping of tags onto an easychart, but the tree only displays the tagname, which is Greek to a customer. Is there a way to display the tag documentation (ie:description) in the tree instead, or even alongside the tagname would be great. I have a label object that shows the documentation of the selected tag in the tree, but a customer would still have to scroll through each tag, looking at the description until they find what they are loo…
