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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

svgViewer Widget . Can i change image color on svg

TW_10599876
5-Regular Member

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