# SVG-Graphics cx\_hide

**URL:** <https://discourse.nodered.org/t/svg-graphics-cx-hide/82558>\
**Category:** Dashboard\
**Created:** [2 November 2023 21:24 UTC](https://discourse.nodered.org/t/svg-graphics-cx-hide/82558 "2023-11-02T21:24:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ninaaa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ninaaa/32/93493_2.png) [@ninaaa](https://discourse.nodered.org/u/ninaaa)\
**Post date:** [2 November 2023 21:24 UTC](https://discourse.nodered.org/t/svg-graphics-cx-hide/82558/1 "2023-11-02T21:24:33Z")

</div>

Hello,

I would like to show/hide an element in an svg graphic.

I looked at a few things about this and via cx\_hide it also works in template (with function "return {  
payload: msg.payload,  
topic: "xxxx@cx\_hide"  
};".

However, not in the svg.

Does anyone have an idea for me please.

thanks greetings

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [2 November 2023 22:48 UTC](https://discourse.nodered.org/t/svg-graphics-cx-hide/82558/2 "2023-11-02T22:48:23Z")

</div>

Hi @ninaaa,

In the [manual](https://github.com/bartbutenaers/node-red-contrib-ui-svg/blob/f10f2a313a4156ddb773ddc804880731d409efee/docs/msg_control.md#remove-an-attribute-via-msg) you can find a demo about changing the **visibility** of an svg element. Does that help?

Bart

---

<div class="post-metadata">

**Author:** ![ninaaa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ninaaa/32/93493_2.png) [@ninaaa](https://discourse.nodered.org/u/ninaaa)\
**Post date:** [3 November 2023 21:44 UTC](https://discourse.nodered.org/t/svg-graphics-cx-hide/82558/3 "2023-11-03T21:44:37Z")

</div>

Thanks for the tip.  
Unfortunately, something always doesn't work for me!

Since I work with S7 I get the message  
"A msg.payload is required (msg.\_msgid = '5c16bb24d2fe53cc')" always with a different msgid.

I couldn't recreate the error any other way!

The ON/HIDE works, but the error message always comes up.

---

<div class="post-metadata">

**Author:** ![ninaaa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ninaaa/32/93493_2.png) [@ninaaa](https://discourse.nodered.org/u/ninaaa)\
**Post date:** [3 November 2023 21:49 UTC](https://discourse.nodered.org/t/svg-graphics-cx-hide/82558/4 "2023-11-03T21:49:59Z")

</div>

I've just solved the problem.  
I used two changes, now I have solved it with one cahnge and two rules and the problem is no longer there!

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [3 December 2023 21:50 UTC](https://discourse.nodered.org/t/svg-graphics-cx-hide/82558/5 "2023-12-03T21:50:30Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
