Help with iframe query parameters

I would like to embed a graph that displays only the last 24 hours, but my query params are not working as expected. I can’t find a guide for correctly formatted parameters, as the docs don’t list them or link to them. I cobbled the code below from a chatgpt solution, but it resolves to a fixed view of the last 30d.

Can I get help formatting my query parameters?

(iframe tag here) src=“https://your-grafana-url/d/openweather-data?orgId=1&panelId=3from=now-24h&to=now” width=“100%” height=“400” frameborder=“0” (/iframe tag here)

  • What Grafana version and what operating system are you using?
    10.0.2

  • What are you trying to achieve?
    Display past 24h in react webpage iframe

  • How are you trying to achieve it?
    using the above iframe tag

  • What happened?
    it defaults to past 30d

  • What did you expect to happen?
    display last 24h

  • Can you copy/paste the configuration(s) that you are having problems with?
    above

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    N/A

  • Did you follow any online instructions? If so, what is the URL?
    Share dashboards and panels | Grafana documentation
    chatgpt

(iframe tag here) src=“https://your-grafana-url/d/openweather-data?orgId=1&panelId=3from=now-24h&to=now” width=“100%” height=“400” frameborder=“0” (/iframe tag here)

It doesn’t look to me like you’re doing anything major wrong but there’s a tiny nit you missed. This:

panelId=3from=now-24h&to=now

should be this:

panelId=3&from=now-24h&to=now

It’s just one missing ampersand. Note that in your query parameters, you are submitting a parameter called “panelId” whose value is “3from=now-24h” which is definitely not what you mean.

Hope this helps

1 Like

Thank you very much, Sorry I missed this message.

1 Like