# Powerchart - Add pens via script

**URL:** <https://forum.inductiveautomation.com/t/powerchart-add-pens-via-script/41041>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [November 30, 2020, 1:02pm UTC](https://forum.inductiveautomation.com/t/powerchart-add-pens-via-script/41041 "2020-11-30T13:02:36Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [November 9, 2022, 12:55pm UTC](https://forum.inductiveautomation.com/t/powerchart-add-pens-via-script/41041/10 "2022-11-09T12:55:38Z")

</div>

> [@edwinfreirec](#):
>
> Initially, we were thinking to use tag browser, which is fine as long as there aren’t external features (in this case department, which come from a database), that links to tags visibility/ filtering [if our exploration is not wrong]. Therefore, whether we are not wrong, we are intending to do a pre-work (tags, department, user) and show the specific tags on 1) a table or 2) a drop down box, thus these can be appended to a power chart.

You **can** use an external Tag Browse Tree Component, in conjunction with the filter extension function, to filter the tags. Just not the one that is embedded in the Power Chart. You have yet to explain how the Tag knows what department it belongs to, or how that can be determined other than just "its in a database".

You will also need to hide the Chart Settings as @pascal.fragnoud points out because from there, if a user knows the path to a tag, even one that is outside of their "department" they can access that tag.

Once you have selected a tag, through whatever method, you will need to use a script to add a new pen to the chart.

Link to their other post, with some more details.

> [@Perspective Power Chart: Graphs Config Management in DB/ Tags display in browse tag](https://forum.inductiveautomation.com/t/perspective-power-chart-graphs-config-management-in-db-tags-display-in-browse-tag/65927):
>
> Hi All, In Perspective, Power Chart, it needs to create a specific graphs base on tags selection, which is ok. Moreover, the idea is, these graphs should be saved/ stored for further recalls/ retrieve. I have seen that there is into the Ignition Exchange an Ad Hoc Trends that helps in this functionality (save configuration - [Ignition Exchange | Inductive Automation](https://inductiveautomation.com/exchange/46/overview)). I assume whether there are large number of configured trends-graphs, these can be saved into a data base to storage them, and i…

---

_[View the full topic](https://forum.inductiveautomation.com/t/powerchart-add-pens-via-script/41041)._
