I am displaying data using HTML graphics plugin. I implemented a toggle switch for customization. My problem is I can not read the value of the toggle in grafana.
you can see the toggle here, it works perfectly: Open the console and you will see the boolean value returning from the toggle.
If I copy the code to my grafana, for some reason I can not read the boolean value in the console, the value is always null.
Javascript is not the issue if you install the plugin “HTML graphics” it basically uses javascript, HTML and CSS to create your own custom panel. I am using javascript to get the information from DB queries and transform the HTML to display the data BUT that toggle I want to implement will allow me to customize the info before.
Normally you use document.querySelector to get the class in the HTML and then play with it in your code, for some reason I can not get that class (Which is in my HTML code).
I think the javascript is aiming to another point or is been blocked for some reason that I do not know yet.
The onClick in my input is calling the function. If I run it without the functions it shows an error saying that the checkbox is null.
I think it is something missing in my HTML…