How to scale the Iframe in ThingSpeak Field Chart

Vincent Zakka on 4 Apr 2021
Latest activity Reply by Ulf Granlund on 18 Apr 2022

This is a very basic thing but I am just beginning and I can't find the solution. When I increase the iframe width and height, the outside frame gets bigger but the graphs itself stay the same size. I read in a forum that suggests "auto" sizing feature by changing the iframe's src URL to something like the following:

http://thingspeak.com/channels/423600_ID/charts/2?width=auto&height=auto

I did and the size of the graph did scale well. However, the Number of entries to retrieve is default, which 100. Which means that after the first 100 points, as more entries comes, the first ones disappears. Please how can i increase the number of entries, lets say to the maximum?

Thank you in advance.

Ulf Granlund
Ulf Granlund on 18 Apr 2022 (Edited on 18 Apr 2022)

Hi, I am trying to change the size of the my chart by using the height,width=auto parameters as suggested above. However I can't make this work. What am I doing wrong? I increased the size of the iframe, but the chart does not scale accordingly. This is my iframe: width="900" height="520" src="https://thingspeak.com/channels/233674/charts/6?width=auto?height=auto?bgcolor=%23ffffff&color=%23d62020&dynamic=true&days=1&title=Temperatur+v%C3%A4xthuset&type=line&xaxis=Datum&yaxis=Temp+%C2%B0C"</iframe>

Vinod
Vinod on 18 Apr 2022 (Edited on 18 Apr 2022)

Your src is almost right. When you have multiple query parameters, the first one is separated from the URI using a ? and the subsequent ones using a &. So, try this:

< iframe width="900" height="520" src="https://thingspeak.com/channels/233674/charts/6?width=auto&height=auto&bgcolor=%23ffffff&color=%23d62020&dynamic=true&days=1&title=Temperatur+v%C3%A4xthuset&type=line&xaxis=Datum&yaxis=Temp+%C2%B0C" < /iframe>

Ulf Granlund
Ulf Granlund on 18 Apr 2022

Thank You so much! Problem solved. Annoying I didn't see that! /Ulf

Christopher Stapels
Christopher Stapels on 18 Apr 2022

Change the URL for src: https://thingspeak.com/channels/233674/charts/6?width=520&height=900

Christopher Stapels
Christopher Stapels on 5 Apr 2021

Have a look at the Charts API The results parameter will help you, up to 8000 points.

You can also change the setting dynamic to false to keep the chart from updating unless you refresh, if that is your preference.