# SVG node, change one item's color from another node?

**URL:** <https://discourse.nodered.org/t/svg-node-change-one-items-color-from-another-node/35558>\
**Category:** General\
**Created:** [8 November 2020 19:11 UTC](https://discourse.nodered.org/t/svg-node-change-one-items-color-from-another-node/35558 "2020-11-08T19:11:12Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [6 December 2020 22:17 UTC](https://discourse.nodered.org/t/svg-node-change-one-items-color-from-another-node/35558/5 "2020-12-06T22:17:00Z")

</div>

Hi Russ,  
It is always better to start a new discussion if you encounter a new problem. Because it is confusing for readers, and people with knowledge about dashboard alignment might not read a thread with a subject about SVG item colors...

And can you please add some screenshots, with arrows to point where we have to look. That makes it much easier to understand your problem. And then hopefully some others can join the discussion, because I'm not an expert in dashboard widget alignments ...

> [@RASelkirk](#):
>
> Both my SVGs are 40x40 p

That I don't understand. The width and height of your SVG are _"100"_ which means _"100px"_ (not _"100%"_), so your SVG is 100p x 100px isn't it?

> [@RASelkirk](#):
>
> Not sure what the actual SVG drawing's x: & y: dims are being referenced to

You can see in this StackOverflow [discussion](https://stackoverflow.com/questions/34237203/does-x-y-attributes-of-a-svg-really-work) that the x/y attributes are only used when you have an SVG nested into another SVG.

> [@RASelkirk](#):
>
> I can completely remove the viewport (0 0 0 0)

That I also don't understand. The _ **viewport** _ is defined by your svg `width` and `height` attributes. Do you mean the _ **viewbox** _ attribute? The viewbox can be used to specify which part of your SVG drawing needs to be displayed in your viewport. See [this](https://discourse.nodered.org/t/questions-on-node-red-contrib-ui-svg/37031/9) viewbox demo that I made for somebody else this evening...

> [@RASelkirk](#):
>
> Changing the VP numbers does nothing, deleting them is another story!

What do you mean with that? By using a viewBox, the svg contents will scale (with its parent container), without it won't...

---

_[View the full topic](https://discourse.nodered.org/t/svg-node-change-one-items-color-from-another-node/35558)._
