# Send different parameters to an Easy Chart

**URL:** <https://forum.inductiveautomation.com/t/send-different-parameters-to-an-easy-chart/21007>\
**Category:** Ignition\
**Created:** [November 21, 2018, 9:22pm UTC](https://forum.inductiveautomation.com/t/send-different-parameters-to-an-easy-chart/21007 "2018-11-21T21:22:26Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![rroca](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@rroca](https://forum.inductiveautomation.com/u/rroca)\
**Post date:** [November 21, 2018, 9:22pm UTC](https://forum.inductiveautomation.com/t/send-different-parameters-to-an-easy-chart/21007/1 "2018-11-21T21:22:26Z")

</div>

Hi there,

Is it possible to send different parameters pressing a button to an Easy Chart in the same window? For example, I have two buttons, one with Temperature parameters and when I press it, the Easy Chart shows it, and the other button with electrical parameters, and when I press it, the temperature parameters dissapear and then the same Easy Chart shows just electrical parameters.

Regards.

---

<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:** [November 21, 2018, 9:42pm UTC](https://forum.inductiveautomation.com/t/send-different-parameters-to-an-easy-chart/21007/3 "2018-11-21T21:42:48Z")

</div>

Yes. The simplest way would be to create custom dataset properties on each button with the same names as the configuration properties on the EasyChart (pens, tagPens, axes…). Then in the button’s actionPerformed event, copy the datasets from the button to the chart. Set the datasets up by copy/paste in each property’s dataset editor. (Set the chart the way you want, then copy its config datasets to the corresponding button.)

The actionPerformed events would look something like this:

```auto
ec = event.source.parent.getComponent("Easy Chart")
ec.axes = event.source.axes
ec.pens = event.source.pens
ec.tagPens = event.source.tagPens
ec.calcPens = event.source.calcPens

```

---

<div class="post-metadata">

**Author:** ![rroca](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@rroca](https://forum.inductiveautomation.com/u/rroca)\
**Post date:** [November 22, 2018, 12:22am UTC](https://forum.inductiveautomation.com/t/send-different-parameters-to-an-easy-chart/21007/4 "2018-11-22T00:22:33Z")

</div>

Great! Thank you so much Phil!

---

<div class="post-metadata">

**Author:** ![rroca](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@rroca](https://forum.inductiveautomation.com/u/rroca)\
**Post date:** [November 22, 2018, 1:25pm UTC](https://forum.inductiveautomation.com/t/send-different-parameters-to-an-easy-chart/21007/5 "2018-11-22T13:25:28Z")

</div>

![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/0/071b7b07bcb343fa0b1ae54d1b5ba0ff08e9d9ef.png)

Still have this problem, do you know why the date is in Dec, 1969? Please.🙏

---

<div class="post-metadata">

**Author:** ![Brian](https://avatars.discourse-cdn.com/v4/letter/b/97f17d/32.png) [@Brian](https://forum.inductiveautomation.com/u/Brian)\
**Post date:** [November 22, 2018, 1:46pm UTC](https://forum.inductiveautomation.com/t/send-different-parameters-to-an-easy-chart/21007/6 "2018-11-22T13:46:55Z")

</div>

It’s because you don’t have any data for the chart to display. It should go away on its own when you have some actual data logged for at least one of the pens.

---

<div class="post-metadata">

**Author:** ![rroca](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@rroca](https://forum.inductiveautomation.com/u/rroca)\
**Post date:** [November 22, 2018, 2:28pm UTC](https://forum.inductiveautomation.com/t/send-different-parameters-to-an-easy-chart/21007/7 "2018-11-22T14:28:15Z")

</div>

Oh thanks, I think I’m not using well the Tag Path in Cell Bindings, maybe you can help me please, I have a Data Type structure (Numerico) inside another Data Type Structure (BOMBA), how can I write the tag path to graph a Tag (Valor) that is in Numerico?

{Root Cointainer.BOMBA::Meta.TagPath}/Numerico.Value ? Or something like that?

---

<div class="post-metadata">

**Author:** ![Brian](https://avatars.discourse-cdn.com/v4/letter/b/97f17d/32.png) [@Brian](https://forum.inductiveautomation.com/u/Brian)\
**Post date:** [November 22, 2018, 4:55pm UTC](https://forum.inductiveautomation.com/t/send-different-parameters-to-an-easy-chart/21007/8 "2018-11-22T16:55:18Z")

</div>

I don’t think you need the .Value part of the tag path. Here’s an example of a Cell Update binding that I have on an Easy Chart here:

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/e797cddfb58cc27617e8b8efa454ca18a433b8b3.png)

---

<div class="post-metadata">

**Author:** ![matthew.roberts](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@matthew.roberts](https://forum.inductiveautomation.com/u/matthew.roberts)\
**Post date:** [March 7, 2023, 2:09am UTC](https://forum.inductiveautomation.com/t/send-different-parameters-to-an-easy-chart/21007/9 "2023-03-07T02:09:19Z")

</div>

Hi  
Has anyone an example of a trend with buttons passing cell update bindings? I'm not getting it.

---

<div class="post-metadata">

**Author:** ![leonardo.godoi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/leonardo.godoi/32/27178_2.png) [@leonardo.godoi](https://forum.inductiveautomation.com/u/leonardo.godoi)\
**Post date:** [March 7, 2023, 11:39am UTC](https://forum.inductiveautomation.com/t/send-different-parameters-to-an-easy-chart/21007/10 "2023-03-07T11:39:34Z")

</div>

What exactly do you need? I don't think there's a viable method to pass cell update bindings via script, unless you do your cell update bindings to some custom property on a component on your window and then use the script to update the value on those properties.  
I believe that an easier method would be doing what @pturmel described, have custom dataset properties somewhere, like on each button, and use the script to copy them to the chart's pen dataset properties.  
Both methods end up being very similar, but the second one gives you much more flexibility since you're dealing with the whole dataset.
