# Need help on SVG

**URL:** <https://discourse.nodered.org/t/need-help-on-svg/22224>\
**Category:** Dashboard\
**Created:** [25 February 2020 03:36 UTC](https://discourse.nodered.org/t/need-help-on-svg/22224 "2020-02-25T03:36:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henjoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henjoe/32/52335_2.png) [@Henjoe](https://discourse.nodered.org/u/Henjoe)\
**Post date:** [25 February 2020 03:36 UTC](https://discourse.nodered.org/t/need-help-on-svg/22224/1 "2020-02-25T03:36:11Z")

</div>

Dear all I have this VERY simple flow, but It didn't work.  
I don't know what wrong with this, I just want to change the text and color of an Element in SVG, but I can't do it.

```auto
[{"id":"102121b4.89e68e","type":"ui_svg_graphics","z":"a01466e1.d8c328","group":"b1a0a83c.d02578","order":0,"width":0,"height":0,"svgString":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0\" y=\"0\" height=\"100\" viewBox=\"0 0 100 100\" width=\"100\">\n <rect id=\"svgEditorBackground\" x=\"0\" y=\"0\" width=\"100\" height=\"100\" style=\"fill:none; stroke: none;\"/><text style=\"\" x=\"23.252033233642578\" y=\"18.536584854125977\" id=\"e1_text\" fill=\"black\" font-family=\"Arial\" font-size=\"20px\">Hello</text></svg>","clickableShapes":[],"smilAnimations":[],"bindings":[{"selector":"#e1_text","bindSource":"payload.label","bindType":"text","attribute":""},{"selector":"#e1_text","bindSource":"payload.color","bindType":"attr","attribute":"fill"}],"showCoordinates":false,"autoFormatAfterEdit":false,"outputField":"payload","editorUrl":"http://drawsvg.org/drawsvg.html","directory":"","name":"","x":620,"y":200,"wires":[[]]},{"id":"fcee325d.3f59e","type":"inject","z":"a01466e1.d8c328","name":"","topic":"","payload":"{\"label\":\"this is a test!\",\"color\":\"White\"}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":290,"y":180,"wires":[["102121b4.89e68e"]]},{"id":"b1a0a83c.d02578","type":"ui_group","z":"","name":"Group 1","tab":"fbefeb56.059148","order":1,"disp":true,"width":"30","collapse":false},{"id":"fbefeb56.059148","type":"ui_tab","z":"","name":"SVG","icon":"dashboard","order":3,"disabled":false,"hidden":false}]

```

THanks in Advance !

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [25 February 2020 19:02 UTC](https://discourse.nodered.org/t/need-help-on-svg/22224/2 "2020-02-25T19:02:23Z")

</div>

Are you certain payload is an object and had the required property set to match up with the binding?

Attach a debug node before the and after the SVG node (ensure debug nodes have show complete msg option set)

Attach screen shots of the debug output here.

---

<div class="post-metadata">

**Author:** ![Henjoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henjoe/32/52335_2.png) [@Henjoe](https://discourse.nodered.org/u/Henjoe)\
**Post date:** [25 February 2020 22:18 UTC](https://discourse.nodered.org/t/need-help-on-svg/22224/3 "2020-02-25T22:18:18Z")

</div>

Hello Steve, Thanks for response.  
I actually forgot that in order to do binding, the message should have a topic of 'databind', I feel so noob about that 🤦

---

<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:** [26 February 2020 22:09 UTC](https://discourse.nodered.org/t/need-help-on-svg/22224/4 "2020-02-26T22:09:34Z")

</div>

Hi @Henjoe,  
Thanks for your feedback, because it helps us to understand which kind of difficulties our users have!

I have added a new tutorial _"Use databinding to simplify the input message structure"_ to the SVG node's [wiki page](https://github.com/bartbutenaers/node-red-contrib-ui-svg/wiki), to avoid that other users would run into the same issue as you.  
Bart

---

<div class="post-metadata">

**Author:** ![Henjoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henjoe/32/52335_2.png) [@Henjoe](https://discourse.nodered.org/u/Henjoe)\
**Post date:** [1 March 2020 03:39 UTC](https://discourse.nodered.org/t/need-help-on-svg/22224/5 "2020-03-01T03:39:17Z")

</div>

Thanks Bart ! 🙂  
I do really appreciate this amazing node.

---

<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:** [31 March 2020 03:39 UTC](https://discourse.nodered.org/t/need-help-on-svg/22224/6 "2020-03-31T03:39:18Z")

</div>

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