cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

svgViewer Widget . Can i change image color on svg

TW_10599876
4-Participant

svgViewer Widget . Can i change image color on svg

I would like to know how to display an SVG image with the functionality I desire. If I read a boolean value as 'on', I want to show only green color and hide other colors. If it's 'off', then display only red color and hide other colors. Is there a way to achieve this?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

 

Yes, there is a way but it's not made extremely easy. The SVG is ultimately like an HTML to which you can apply styles.

 

There was a widget made way back for this exact reason, to make floor plans and have colored statuses all over.

https://github.com/ptc-iot-sharing/SvgViewerWidgetTWX

It should come with the necessary documentation in the README.

 

Hope this helps,

Gabriel

View solution in original post

1 REPLY 1

Hi,

 

Yes, there is a way but it's not made extremely easy. The SVG is ultimately like an HTML to which you can apply styles.

 

There was a widget made way back for this exact reason, to make floor plans and have colored statuses all over.

https://github.com/ptc-iot-sharing/SvgViewerWidgetTWX

It should come with the necessary documentation in the README.

 

Hope this helps,

Gabriel

Top Tags