samber / chartjs-plugin-datasource-prometheus

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

Multiple queries on a single chart #6

Closed msrouchou closed 3 years ago

msrouchou commented 3 years ago

Hello, Thank you for this helpful plugin!

I understand this is not to replace Grafana, but is there a way to feed more than one query to the chart ?

My use case is to draw two lines, one for a total sum of type1 entities over time, and one for a sum of type2 entities overtime. These come from two different prometheus metrics.

I can't find a way to do it on the same chart.

Any idea or workaround ?

Thanks again!

samber commented 3 years ago

It is now possible ;)

Check documentation => https://github.com/samber/chartjs-plugin-datasource-prometheus#multiple-queries-in-one-chart

If needed, you can display a separated yAxis on the right.