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

Updating chart queries #38

Closed waleplanet closed 10 months ago

waleplanet commented 11 months ago

Hi I am using this plugin to display a website via cdn. Trying to update the chart query with this code does not update the chart or send a request to the backend

chart.options.plugins['datasource-prometheus'].query = "new query"; chart.update({});

samber commented 11 months ago

It works on demo: https://samber.github.io/chartjs-plugin-datasource-prometheus/example/

Can you tell me what version of datasource-prometheus and chartjs you are using ?

waleplanet commented 11 months ago

chart.js@4 chartjs-plugin-datasource-prometheus@2

it only updates when the timeRange field is updated