I finally made a simple line chart aia

3,894 views
Skip to first unread message

Ryan Cheung

unread,
Nov 8, 2015, 2:04:37 PM11/8/15
to MIT App Inventor Forum
I finally made a line chart aia. It is simple input by the X and Y  data in list. It is auto scale with the data in list and fit to any size of canvas. Just a very little scale tolerance in scale conversion.  Y ratio to control the scale.   Drawing graph in canvas is relative slow in compare with google api chart method. The more data in list the more time to generate the graph. But it break the character limitation of the google chart api (deprecated) . For somebody have no much knowledge on javascript like me. It would be a viable solution. 

I found that if both webviewer and canvas in same screen. The canvas drawing will not work correct at first time drawing. I am not sure is it only happening on my device. Please help to check. I am now set a timer to redraw the canvas after a second to overcome this problem.

Ryan 
blocks (6).png
Plot_Line_Graph.aia

Scott Ferguson

unread,
Nov 8, 2015, 7:43:37 PM11/8/15
to mitappinv...@googlegroups.com
I switched Screen sizing to responsive and it looks and works better.
Especially when rotating the device.
Try it.
---
sf
Plot_Line_Graph_Res.aia

BrandnameOra

unread,
Nov 9, 2019, 2:04:20 PM11/9/19
to MIT App Inventor Forum
Hello from Finland.

I am trying to make this app, but I only see the block picture.
And at the moment I dont know where or how to create the call block?

Could you or someone give screenshots of this?

Taifun

unread,
Nov 9, 2019, 4:57:57 PM11/9/19
to MIT App Inventor Forum
but I only see the block picture.
 can you elaborate or probably post a screenshot, so we know what you are talking about?

And at the moment I dont know where or how to create the call block?
it looks like you still did not do the basic tutorials?
first learning the basics would help you a lot...

A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook   http://www.appinventor.org/book2 ... the links are at the bottom of the Web page.  The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro  and the aia files for the projects in the book are here:  http://www.appinventor.org/bookFiles  
How to do a lot of basic things with App Inventor are described here:  http://www.appinventor.org/content/howDoYou/eventHandling  .

Also do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of App Inventor, then try something and follow the
 Top 5 Tips: How to learn  App Inventor

You will not find a tutorial, which does exactly what you are looking for. But doing the tutorials (not only reading a little bit) help you to understand, how things are working. This is important and this is the first step to do.

Taifun

Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by  Taifun.         




ABG

unread,
Nov 9, 2019, 5:19:57 PM11/9/19
to MIT App Inventor Forum
You can't call a procedure you haven't created yet.

Your procedures will be in the Procedures pallet after you create them.

BrandnameOra

unread,
Nov 10, 2019, 7:23:44 AM11/10/19
to MIT App Inventor Forum
Okay, I finally began to go through this
http://www.appinventor.org/book2

But I was already thinking about that procedure.
How am I supposed to create them?

Chris Ward

unread,
Nov 10, 2019, 7:36:30 AM11/10/19
to MIT App Inventor Forum
Hello

Finish the training and then you will understand. :)  Do you drive a car? If so, you had to learn how to drive it right? Same with App Inventor - you can't just hop in and expect to be able to do everything without learning about it first.
Message has been deleted

BrandnameOra

unread,
Nov 10, 2019, 7:55:37 AM11/10/19
to MIT App Inventor Forum
I'm now going through this book

http://www.appinventor.org/book2

It's inspiring to finally read any material that I consider uplifting.

BrandnameOra

unread,
Nov 10, 2019, 8:32:14 AM11/10/19
to MIT App Inventor Forum
Okay, I finally had time to begin with the tutorials.

I'm trying to begin with the Paintpot app, but then our computer takes a whopping update and our tablet won't work on the website.

What an annoying 10 minutes..

IMG_20191110_152740.jpg
IMG_20191110_152752.jpg

BrandnameOra

unread,
Nov 12, 2019, 1:38:12 AM11/12/19
to MIT App Inventor Forum
The . aia file is the example apk file from the app in question.

I DIDN'T know that!

Well, anyway...
The app is pretty simple.
It's got a button that I can push, and it makes me a line.

BrandnameOra

unread,
Nov 12, 2019, 1:40:19 AM11/12/19
to MIT App Inventor Forum
The first pic is the app, that I have just opened up in my phone.

The second pic is when I pushed the button.

Screenshot_20191112-082203.png
Screenshot_20191112-082208.png

BrandnameOra

unread,
Nov 12, 2019, 1:50:40 AM11/12/19
to MIT App Inventor Forum
Okay, I haven't been able to go through the tutorials, and I will begin making those tutorials right after this message.

I want to elaborate on my question about this plot line graph.

I want to have an app that I can type new weights.
And make those records from 2 years to here.

So, I'm really happy with the example that I see in this example, but now I need to add textboxes(?) to this app and the create 14 more graph pages.

I want to compare my weight on 3 times, the morning and afternoon and evening, from tuesday to friday.

And I did try it on my own in the Sketchware app, but I made even a bigger mess by it.
I shouldn't have expected to just go duplicate everything to the second page.

I have the source file, so if someone wants to see it, I can provide it.
It's just not pretty or working.

BrandnameOra

unread,
Nov 18, 2019, 9:14:55 PM11/18/19
to MIT App Inventor Forum
Okay, these are the screenshots of the plot graph in action.

It takes one push of the button and nothing else.

I need a question asked from the user.
So, the blocks need a textbox, but I can't just go putting one in.

I already did that on the Sketchware app and the help desk dude got annoyed with me.

So, where do I put the textbox?

And another question, of a totally different issue.
After I'm done with the Course in a box, does it tell me how to use artificial intelligence abilities?

I have an app idea stuck in my mind, because of 2 years of passed experience with telemarketing calls problems.
And this AI app idea will give me a chance to give back a little...

Screenshot_20191119-040248.png
Screenshot_20191119-040238.png

TimAI2

unread,
Nov 19, 2019, 3:30:04 AM11/19/19
to MIT App Inventor Forum
You decide where to put the textbox (perhaps put your button inside a horizontal arrangement then the textbox next to it ?)
AI abilities, some can be developed using the "Look extension" from MIT, which will be getting some upgrades soon.

ABG

unread,
Nov 19, 2019, 11:34:30 AM11/19/19
to MIT App Inventor Forum
So, the blocks need a textbox, but I can't just go putting one in.

One of the Notifier blocks can act as a pop up textbox.

ABG
 
Reply all
Reply to author
Forward
0 new messages