# Create Function On Easy Chart

**URL:** <https://forum.inductiveautomation.com/t/create-function-on-easy-chart/2556>\
**Category:** Ignition\
**Created:** [January 26, 2011, 11:54am UTC](https://forum.inductiveautomation.com/t/create-function-on-easy-chart/2556 "2011-01-26T11:54:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aidamcg](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@aidamcg](https://forum.inductiveautomation.com/u/aidamcg)\
**Post date:** [January 26, 2011, 11:54am UTC](https://forum.inductiveautomation.com/t/create-function-on-easy-chart/2556/1 "2011-01-26T11:54:48Z")

</div>

Hi

Just wondering if it possible to create custom functions on easy chart. I see that rows can be added to the Data set for the functions but I am not sure what is the correct method if there is one to add a custom function. I need to calculate a ratio from two database pens I am displaying with the easy chart component. I can do it in the DB but would like to know if it is possible with the easy chart itself

Thanks

Aidan

---

<div class="post-metadata">

**Author:** ![dep05d](https://avatars.discourse-cdn.com/v4/letter/d/e495f1/32.png) [@dep05d](https://forum.inductiveautomation.com/u/dep05d)\
**Post date:** [January 26, 2011, 3:09pm UTC](https://forum.inductiveautomation.com/t/create-function-on-easy-chart/2556/2 "2011-01-26T15:09:50Z")

</div>

Hi Aidan,

If the pens are coming from the same table/view, you can actually create a pen and define the COL\_NAME with a SQL expression, such as COL1/COL2, COL1 \* 2, DECODE(COL1,0,COL2,COL1), etc.

Regarding actual custom functions on any set of pens, that’s an interesting question…I’d be curious to know myself.

Dan

---

<div class="post-metadata">

**Author:** ![aidamcg](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@aidamcg](https://forum.inductiveautomation.com/u/aidamcg)\
**Post date:** [January 26, 2011, 3:22pm UTC](https://forum.inductiveautomation.com/t/create-function-on-easy-chart/2556/3 "2011-01-26T15:22:43Z")

</div>

Hi Dan

That solved the problem I was having. Would be interesting to know if custom functions can be created.

Thanks

Aidan

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [January 28, 2011, 5:22pm UTC](https://forum.inductiveautomation.com/t/create-function-on-easy-chart/2556/4 "2011-01-28T17:22:46Z")

</div>

No, there isn’t a way to add custom functions. This should probably be added as part of the SDK - I think that would be the most appropriate place for this sort of extensibility.
