# Easy Chart Adapt onTagsDropped for Touchscreen Application

**URL:** <https://forum.inductiveautomation.com/t/easy-chart-adapt-ontagsdropped-for-touchscreen-application/84662>\
**Category:** Ignition\
**Tags:** ignition81, scripting, vision\
**Created:** [January 23, 2024, 9:57pm UTC](https://forum.inductiveautomation.com/t/easy-chart-adapt-ontagsdropped-for-touchscreen-application/84662 "2024-01-23T21:57:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [January 23, 2024, 9:57pm UTC](https://forum.inductiveautomation.com/t/easy-chart-adapt-ontagsdropped-for-touchscreen-application/84662/1 "2024-01-23T21:57:19Z")

</div>

I have a custom `onTagsDropped` that I've written for use with an easy chart. However, it's not so easy to drag and drop pens onto an easy chart with a touchscreen.

What's the best way to use a button on the screen to do the same thing with the selected pen? I should be able to grab the component and the paths from the tag browser and call the same `onTagsDropped` function, right?

---

<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:** [January 23, 2024, 10:01pm UTC](https://forum.inductiveautomation.com/t/easy-chart-adapt-ontagsdropped-for-touchscreen-application/84662/2 "2024-01-23T22:01:03Z")

</div>

> [@amarks](#):
>
> call the same `onTagsDropped` function, right?

If you made the `onTagsDropped` **event** a one-line call to a project library script function, yes.

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [January 23, 2024, 10:06pm UTC](https://forum.inductiveautomation.com/t/easy-chart-adapt-ontagsdropped-for-touchscreen-application/84662/3 "2024-01-23T22:06:10Z")

</div>

I did! Easy peasy. Custom dataset property on the button bound to the selected paths from the tag browse tree.

```auto
paths = event.source.paths.getColumnAsList(0)

chart = event.source.parent.getComponent('Custom')

Trending.customChartTagsDropped(chart, paths)

```
