Easy chart with tag drop multiple Axis

So… I’m sure there is an answer for this I just can’t seem to find it right now.

I’ve got an easy chart for a dynamic tag pick historian type page. When the operator drops the tag onto the chart there isn’t another axis added. I think I have to add the axis myself correct?

If I need to add the axis myself, how do I know if that tag has been removed from the chart so I can remove the axis as well?

Does anyone have any examples etc?


You’ll want to override the onTagDropped() extension function of the easyChart to get the custom functionality you want. The default behaviour basically adds the appropriate details to the tagPens dataset, and I believe it uses whatever axis is present already (in the axes dataset). Your custom onTagDropped() function can add or update axes, manipulate the setting on the pen as you see fit, and even provide suitable functionality for the pens dataset (non-tag historian trends) where you have the relevant details available. You can leave unused entries in the axes dataset without harm – they won’t show if no pen is using them.

So when the X is clicked in the pens list to remove the pen from the chart the onTagDropped() extension is called?

No, for that you’d use a propertyChange event that responds to propertyName equal to pens, tagPens, or calcPens. The configureChart extension function is also called on changes to the pens, but changing more will recurse.