# Looking for advice on dynamic Pen creation in the Power Chart component

**URL:** <https://forum.inductiveautomation.com/t/looking-for-advice-on-dynamic-pen-creation-in-the-power-chart-component/67751>\
**Category:** Ignition\
**Tags:** perspective, scripting, ignition80\
**Created:** [December 17, 2022, 12:55am UTC](https://forum.inductiveautomation.com/t/looking-for-advice-on-dynamic-pen-creation-in-the-power-chart-component/67751 "2022-12-17T00:55:37Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [December 17, 2022, 2:37pm UTC](https://forum.inductiveautomation.com/t/looking-for-advice-on-dynamic-pen-creation-in-the-power-chart-component/67751/3 "2022-12-17T14:37:47Z")

</div>

> [@pascal.fragnoud](#):
>
> Phil might suggest a dictionary/list at the top level of your script library.

Yes, if scripting anyways. If avoiding scripting to avoid its startup penalty, the `lookup()` expression function with a dataset tag is a performant option.

> [@pascal.fragnoud](#):
>
> pyr['value'].quality.isGood()  
> pyr['value'].quality.isNotGood()

No, this:

```auto
pyr['value'].quality.good
not pyr['value'].quality.good

```

Use the NetBeans shortcuts everywhere applicable, not just `.value` or `.quality`, as they run faster and are more readable. Even better is to only check `.good` in the `if` clause and use an `else:` clause for not good.

---

_[View the full topic](https://forum.inductiveautomation.com/t/looking-for-advice-on-dynamic-pen-creation-in-the-power-chart-component/67751)._
