Read Information/Current Data from Panel in HTML

Hello dear all,

I am relatively new to the Grafana community. I wanted to ask how to read data (current status for example) from Grafana panels?

I have a status panel (Name=“StatPanel”) which shows me the last value of a time series. I also have a second text panel which I use to have HTML and JavaScript access . In this HTML text panel I now try to save the current value of the status panel in a variable.

Unfortunately I don’t know much about Javascript or Grafana and by just reading and doing research I can’t get any further…

I tried to handle something around this:

<label id="showme"></label>

<script>

    var data = "null";
    namewert = document.getElementById('StatPanel').innerHTML;
    document.getElementById('showme').innerHTML = `text: ${data}`;

</script>

Honestly, I do not know what to do and wanted to ask for inspiration and suggestions.

Thank you so much!

Hi @nifer,

Welcome to the :grafana: community support forums !!

We are excited that you joined our OSS community. Please read about some of the FAQs in the community :slight_smile:

One question. Does it need to be the Stat/status panel or any other panel?