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)