# Perspective: Hide element from PieChart

**URL:** <https://forum.inductiveautomation.com/t/perspective-hide-element-from-piechart/41099>\
**Category:** Ignition\
**Tags:** perspective, ignition80\
**Created:** [December 1, 2020, 5:52pm UTC](https://forum.inductiveautomation.com/t/perspective-hide-element-from-piechart/41099 "2020-12-01T17:52:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![julian.medina](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/julian.medina/32/9805_2.png) [@julian.medina](https://forum.inductiveautomation.com/u/julian.medina)\
**Post date:** [December 1, 2020, 5:52pm UTC](https://forum.inductiveautomation.com/t/perspective-hide-element-from-piechart/41099/1 "2020-12-01T17:52:36Z")

</div>

Hi!

So, I have a page that I use as a template, right now I have 2 Piecharts for each group of values to chart.  
Let’s say that I have 6 groups of values, where in one I have 9 values, and the rest has less and less.

Now, my template has a pair of PCs for each group but only shows them when the template is configured for said group, this, while simple, takes a heavy CPU toll because the PCs are there, but hidden, they still update as the any of their values do.

So, one of my ideas was to dynamize the values using the case() command in expression language, but during proof of concept tests, I noticed that the data element won’t disappear when using either double quote or deleting the nametag whatsoever, see the example:

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/a/2aeb1de4a7d8b22c95f215441e54ee534bb457ad.png)

So, without doing a page for each group containing their couple of PCs (because, that’s the whole point of the template), how do I dynamize the PieChart to hide the unused data values?

Or, conversely, is there a way to DISABLE the autoupdate on the Pie Charts (so I can just hide them without using CPU power)?

---

<div class="post-metadata">

**Author:** ![julian.medina](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/julian.medina/32/9805_2.png) [@julian.medina](https://forum.inductiveautomation.com/u/julian.medina)\
**Post date:** [December 2, 2020, 8:36pm UTC](https://forum.inductiveautomation.com/t/perspective-hide-element-from-piechart/41099/2 "2020-12-02T20:36:00Z")

</div>

So, I found a way to circumvent this and I’ll put it here for everyone to know:

What I did was create several views containing each pair of Piecharts and in the _template page_ I mentioned (let’s call it the parent page) I put an _Embedded view Component_.

In the _embedded view component_, I used an _expression binding_ with `case()` at the “_path_” property, this way I could achieve the dynamization I wanted and reduce the CPU usage.

I also dynamized the _visibility_ for when a _parent page_ was from a “group” with only one component and no _PieChart_ was needed. This way it hid the _Embedded view component_ and the path property had a default vaule of “true”, which also reduced CPU usage and hid the error message for the user. 🤭

However, **it would be better** if the objects (flavors) on the _PieChart_ could be hidden, instead of having different _Piecharts_ for each differently-sized group.
