Weird can't redraw chart problem - solved
Posted: Wed Feb 21, 2024 7:56 am
Hi:
I want to alter the data on a chart and then redraw the chart to reflect new colours and new data.
1. There is no "redraw" command in the chart widget to trigger a redraw
2. People have said that "set the backgroundColor of me to the backgroundColor of me" sent from the card will cause a redraw but it didn't work for me
3. That command DOES work from the msg box - interesting
4. If I put that command in my stack wrapped in a named command and SEND a message to the stack that calls my command - IT DOES WORK. Problem solved.
Sort of solved. It works perfectly fine. I don't have a robust solution because I haven't yet tested it extensively. It appears to work. Which is a great deal of progress from before. I wanted to make this info available in case anyone else was suffering the same way I was suffering.
Also, I noticed there is a "redraw" command in the dictionary which supposedly will redraw the card. That would be the neatest solution if it works. I have not bothered to test it since this problem has put me behind on a deadline and I have a working solution.
I want to alter the data on a chart and then redraw the chart to reflect new colours and new data.
1. There is no "redraw" command in the chart widget to trigger a redraw
2. People have said that "set the backgroundColor of me to the backgroundColor of me" sent from the card will cause a redraw but it didn't work for me
3. That command DOES work from the msg box - interesting
4. If I put that command in my stack wrapped in a named command and SEND a message to the stack that calls my command - IT DOES WORK. Problem solved.
Sort of solved. It works perfectly fine. I don't have a robust solution because I haven't yet tested it extensively. It appears to work. Which is a great deal of progress from before. I wanted to make this info available in case anyone else was suffering the same way I was suffering.
Also, I noticed there is a "redraw" command in the dictionary which supposedly will redraw the card. That would be the neatest solution if it works. I have not bothered to test it since this problem has put me behind on a deadline and I have a working solution.