Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Change fill colour of arc at run-time

ANSWERED

 Hi,

Is it possible to change the fill colour of an arc at run-time in the index.js file?

I have a code line: arc1.fill = "fb-red";   which doesn't throw an error but doesn't change the colour of the arc.  

I wanted the colour of the arc to vary as the value gets low.  I'm currently using two arc on top of each other with different fill colours defined in the index.gui but wondered if there was a better way to do this.

 

First question on this board, which I must say has been amazingly useful so far.

Thanks.

 

 

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Try

arc1.style.fill = "red"

View best answer in original post

Best Answer
0 Votes
2 REPLIES 2

Try

arc1.style.fill = "red"
Best Answer
0 Votes

Thanks Jon.  Much appreciated.

Best Answer
0 Votes