Page 1 of 1

Weird can't redraw chart problem - solved

Posted: Wed Feb 21, 2024 7:56 am
by bbalmerTotalFluency
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.

Re: Weird can't redraw chart problem - solved

Posted: Wed Feb 21, 2024 6:07 pm
by jacque
I don't see a redraw command in the dictionary. I do see three commands that are either inactive or apply only to specific controls like the (deprecated) Browser.

Re: Weird can't redraw chart problem - solved

Posted: Wed Feb 21, 2024 7:18 pm
by FourthWorld
jacque wrote:
Wed Feb 21, 2024 6:07 pm
I don't see a redraw command in the dictionary. I do see three commands that are either inactive or apply only to specific controls like the (deprecated) Browser.
There's a "redraw" item in the Glossary portion of the Dictionary window.

The Dictionary defaults to showing both language elements and glossary terms, requiring readers looking to learn the language to work harder to make sure they either change the default setting when searching, or pay closer attention to which category of entry they're looking at.

Re: Weird can't redraw chart problem - solved

Posted: Wed Feb 21, 2024 8:07 pm
by jacque
There's a "redraw" item in the Glossary portion of the Dictionary window.
That makes more sense. And here I was about to get all excited.

Re: Weird can't redraw chart problem - solved

Posted: Fri Feb 23, 2024 9:45 pm
by bobcole
When one puts data into the lineChart widget's Property Inspector the chart is automatically updated.
This happens when one enters the data by hand or by script.
I guess that I don't understand the case presented by the Original Poster (OP).
Bob

Re: Weird can't redraw chart problem - solved

Posted: Fri Mar 08, 2024 9:24 am
by bbalmerTotalFluency
The redraw is automatic on osx but not on the iPhone, at least not for me. I had expected the auto-redraw behaviour and was surprised when i didn't get it. In the end changing the dataBackgroundColors provoked a redraw.

Re: Weird can't redraw chart problem - solved

Posted: Fri Mar 08, 2024 5:50 pm
by bobcole
Ah! Now I understand. I was testing on MacOS.
Glad you found a workaround.
Bob