# Indirect Tag in Easy Chart in a Popup

**URL:** <https://forum.inductiveautomation.com/t/indirect-tag-in-easy-chart-in-a-popup/17485>\
**Category:** General Discussion\
**Created:** [March 24, 2018, 9:45pm UTC](https://forum.inductiveautomation.com/t/indirect-tag-in-easy-chart-in-a-popup/17485 "2018-03-24T21:45:13Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [August 18, 2020, 12:08pm UTC](https://forum.inductiveautomation.com/t/indirect-tag-in-easy-chart-in-a-popup/17485/21 "2020-08-18T12:08:11Z")

</div>

For anyone struggling with this I offer this procedure to explain pturmel’s solution:

**Problem definition**  
We want a template popup for trend charts. This requires passing several pieces of data to the popup:

- A dataset containing the pens configuration.
- A dataset containing the axis configuration.
- (Optional / future) A dataset containing the subplot configuration.
- A title for the popup.

**Sample application**  
The main trick with this procedure is to configure a chart exactly as you want it to appear and then copy its dataset properties into the custom dataset properties of the button used to call the popup.

**Structure**

- Main window
  - Button
    - Custom properties
      - tagPens
      - axisData

- Popup
  - Root container
    - Custom properties
      - tagPens
      - axisData
      - Title

  - Easy Chart
    - Bind (uni-directionally) the Tag Pens to the popup’s root container’s tagPens property.
    - Bind (uni-directionally) the Axes to the popup’s root container’s axisData property.

  - Title label
    - Bind the text to the popup’s root container’s Title property.

**Setup**  
For each button:

- Open the popup in the Designer. Configure the chart exactly as you want it to appear for that popup.

- You’re now going to copy the Tag Pens dataset that you have created in Easy Chart over to the tagPens dataset you created for the button on the main window.

- Now go back to the main window. You’re going to paste the dataset into the button’s custom properties.

- Repeat the procedure for the axisData dataset.

- Finally you need to set the action for the button:

Next button …

This may seem a little tedious but it is very powerful and using datasets allows you to handle charts with multiple pens, different aggregation modes, sub-plots (which will require an additional dataset to be passed) etc.

Thanks to Paul for posting enough information for me to figure this out.

---

<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:** [August 18, 2020, 12:18pm UTC](https://forum.inductiveautomation.com/t/indirect-tag-in-easy-chart-in-a-popup/17485/22 "2020-08-18T12:18:25Z")

</div>

> [@Transistor](#):
>
> I offer this procedure to explain pturmel’s solution

Well done!

[Previous page](https://forum.inductiveautomation.com/t/indirect-tag-in-easy-chart-in-a-popup/17485.md?page=1)
