Skip to first unread message

Jaymin

unread,
Mar 29, 2017, 12:52:30 PM3/29/17
to MIT App Inventor Forum
Enter code here...
Hi All,
Hope I am in the correct section as I am new to app inventor.
My problem is that i am trying to show 4 charts that i created on thingspeak, I can get one to show, but not getting any where with showing the others.
The location of the files is , the only differance in the code is the Number after the /charts/ directory, you put either 1,2, 3 etc depending how many charts you have

If i use either of these address all works fine but if  i want Multiple charts to show only one is visible, if i want to view in a web page on the computer with crome it looks OK, the only thing i have come up with is that it is displaying both are overwriting the first screen, as it is always the scond address that shows.
If this is the case is there a so to have these multiple charts to be view
This is the program.I am using a button to start the screen.

Hope someone can help
Regards
Peter





Taifun

unread,
Mar 29, 2017, 1:05:25 PM3/29/17
to MIT App Inventor Forum
you are using the activity starter to open a browser with your URL
which URL would you use to display multiple charts?
Taifun 

Peter Young

unread,
Mar 30, 2017, 1:15:15 AM3/30/17
to MIT App Inventor Forum
Taifun,
Thank you for your reply.
the URLs that i posted are examples of the some of the charts that are live now on thingspeak. the codeing is one way that i can view the charts, but i can only view one of them. i need to be able to change the code so that all the charts can be viewed at the same time on the same page.should i create a web page ?
<iframe width="450" height="250" style="border: 1px solid #cccccc;" src="http://thingspeak.com/channels/CHANNEL_ID/charts/FIELD_ID?api_key=XXXXXXXXXXXXX"></iframe>
if I create this code in a local web page it allows me to show multi charts, but only new at app inventor and do not know how to program this 
.
the sample code with multiple charts will not work it still only shows the one chart which is No.2

Sivagiri Visakan

unread,
Mar 30, 2017, 7:44:46 AM3/30/17
to mitappinv...@googlegroups.com
Hello Peter,
if I create this code in a local web page it allows me to show multi charts, but only new at app inventor and do not know how to program this 

 If the webpage with the code mentioned can display all the charts,then you can upload the *.html file to the project and use the web viewer to show the html file .

SteveJG

unread,
Mar 30, 2017, 9:29:43 AM3/30/17
to MIT App Inventor Forum
Instead of an ActivityStarter to display, I would use two (2) WebViewer on your screen.  One would use the url     http://thingspeak.com/channels/247447/charts/1?api_key=VE2SOFTIKCMK3IRH  and the the other chart url.on the second viewer.

The reason the ActivityStarter shows only the second url in your code is because that is what your code instructed the AS to do.  It is overwriting the the first url.   You cannot display the results of two ASs simultaneously, so use two webviewers on your app.  

Did that work?

Regards,
Steve

Peter Young

unread,
Mar 30, 2017, 12:13:47 PM3/30/17
to MIT App Inventor Forum
Hi SteveJG,
Thank you for your help, this has achieved what i was trying to do.
Regards
Peter

Reply all
Reply to author
Forward
0 new messages