Weird can't redraw chart problem - solved
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 52
- Joined: Mon Apr 06, 2020 1:19 pm
- Location: Thailand
- Contact:
Weird can't redraw chart problem - solved
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.
-
- VIP Livecode Opensource Backer
- Posts: 7258
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Weird can't redraw chart problem - solved
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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 9857
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Weird can't redraw chart problem - solved
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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 7258
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Weird can't redraw chart problem - solved
That makes more sense. And here I was about to get all excited.There's a "redraw" item in the Glossary portion of the Dictionary window.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 137
- Joined: Tue Feb 23, 2010 10:53 pm
- Location: Saint Louis, Missouri USA
Re: Weird can't redraw chart problem - solved
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
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
-
- Posts: 52
- Joined: Mon Apr 06, 2020 1:19 pm
- Location: Thailand
- Contact:
Re: Weird can't redraw chart problem - solved
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.
-
- VIP Livecode Opensource Backer
- Posts: 137
- Joined: Tue Feb 23, 2010 10:53 pm
- Location: Saint Louis, Missouri USA
Re: Weird can't redraw chart problem - solved
Ah! Now I understand. I was testing on MacOS.
Glad you found a workaround.
Bob
Glad you found a workaround.
Bob