Hello,
Today, I’m working with Grafana 5 and using a homemade plugin based on the discrete panel. Recently, I discovered the “State Timeline” plugin provided by Grafana and found it to be really great! However, I encountered an issue with it—I need to display the last/current value of each chart, which I couldn’t achieve using this plugin.
Rather than reinventing the wheel by creating an entire plugin from scratch, I’d prefer to enhance the StateTimeline Plugin if possible. However, I’ve spent the past week trying to understand its architecture. Unfortunately, the StateTimeline Plugin utilizes UPlot to create charts, and UPlot doesn’t offer the specific feature I need, or i didn’t find it. I attempted to modify the code at various levels, but without success.
This week, I tried a different approach by modifying the UPlot component within Grafana (located at grafana-ui/component/UPlot) to incorporate a simple homemade component that displays the last/current value of each chart. However, this solution isn’t ideal as it impacts other plugins, and I believe this feature shouldn’t be added there.
Previously, I attempted to add a second y-axis using the addAxis()
function. While I managed to display the last value, it wasn’t updated with each render.
My question is: Do you know if it’s possible to display this last value using the StateTimeline Plugin? Alternatively, is it possible to update the value of the y-axis with each render? Or do you have any other ideas on how to achieve this?
Appreciate any help you can provide!