# Perspective: Hide SVG elements

**URL:** <https://forum.inductiveautomation.com/t/perspective-hide-svg-elements/39448>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [October 7, 2020, 12:50am UTC](https://forum.inductiveautomation.com/t/perspective-hide-svg-elements/39448 "2020-10-07T00:50:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 7, 2020, 12:50am UTC](https://forum.inductiveautomation.com/t/perspective-hide-svg-elements/39448/1 "2020-10-07T00:50:59Z")

</div>

v8.1.0rc1

Is it possible to hide SVG elements? I’ve tried creating a `visible` key with value `false` and `hidden`, as well as a `visibility` key with values `hidden` and `false` with no success.  
As a workaround, I’ve found that changing the `type` to anything but `path` will effectively hide it…

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

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [October 7, 2020, 6:35am UTC](https://forum.inductiveautomation.com/t/perspective-hide-svg-elements/39448/2 "2020-10-07T06:35:35Z")

</div>

The problem is probably that attributes have a lower priority than CSS.

So the order of priority is:

- SVG attributes
- Global CSS styles
- Inline CSS styles

In particular, if the global CSS style even defines something like `visibility:inherit`, which seems like a nice default for all elements, you can no longer set the visibility key on the SVG.

The only decent workaround seems to use inline styles: `style="visibility:hidden"`

---

<div class="post-metadata">

**Author:** ![gnguyen](https://avatars.discourse-cdn.com/v4/letter/g/41988e/32.png) [@gnguyen](https://forum.inductiveautomation.com/u/gnguyen)\
**Post date:** [October 7, 2020, 8:56am UTC](https://forum.inductiveautomation.com/t/perspective-hide-svg-elements/39448/3 "2020-10-07T08:56:07Z")

</div>

Out of topic, sorry, but how did you get sag inside Perspective… it seems that since 8.1.x, drag and drop sag is not working ;(  
Thanks

---

<div class="post-metadata">

**Author:** ![dkylep](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@dkylep](https://forum.inductiveautomation.com/u/dkylep)\
**Post date:** [November 5, 2020, 12:57am UTC](https://forum.inductiveautomation.com/t/perspective-hide-svg-elements/39448/4 "2020-11-05T00:57:24Z")

</div>

`visibiltiy: hidden` does work you just have to put it inside the style property  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/2/f269a066ed9d1a2ac1fb76072524e557411c90cd.png)

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 5, 2020, 1:00am UTC](https://forum.inductiveautomation.com/t/perspective-hide-svg-elements/39448/5 "2020-11-05T01:00:15Z")

</div>

> [@dkylep](#):
>
> `visibiltiy: hidden` does work you just have to put it inside the style property

It works for the whole SVG, but not for the **elements** of the SVG.  
I found a dodgy workaround where setting the type to something else, e.g. 'group', will 'hide' it.

---

<div class="post-metadata">

**Author:** ![dkylep](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@dkylep](https://forum.inductiveautomation.com/u/dkylep)\
**Post date:** [November 5, 2020, 1:13am UTC](https://forum.inductiveautomation.com/t/perspective-hide-svg-elements/39448/6 "2020-11-05T01:13:58Z")

</div>

it actually does work for elements too  
you just need to add a style object to each of the elements and add the visibility to the style object  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/f/0fe718486792770e61da604a19560cb4c0863c92.png)
