samber / chartjs-plugin-datasource-prometheus

📊 Chart.js plugin for Prometheus
https://www.npmjs.com/package/chartjs-plugin-datasource-prometheus
MIT License
109 stars 20 forks source link

Loading and rendering states #35

Closed mnutt closed 1 year ago

mnutt commented 1 year ago

This resolves an issue I was having where the 'loading' message wouldn't show when initially fetching data. I ended up having to separate the concept of 'loading' (fetching data from the backend) and 'rendering' (don't kick off another loading). It's not the most elegant--something still feels off about the circular hook usage, I might open a conversation with the chartjs devs to see if there's a better way to accomplish this.

samber commented 1 year ago

Thanks for the contrib.

Please open an issue to describe it and for tracking the follow-up!