miguelgrinberg / turbo-flask

Integration of Hotwire's Turbo library with Flask.
MIT License
301 stars 35 forks source link

Dynamically updating highcharts with Turbo-Flask #28

Closed reghardtp closed 2 years ago

reghardtp commented 2 years ago

Hi,

My goal is to display live data pushed from the server. Now as far as I understand Turbo-Flask will replace/append a valid HTML string, is Turbo-Flask a good tool to then push data to the frontend to handle the update of the chart?

Is there a different tool to rather use?

Thanks!

miguelgrinberg commented 2 years ago

Turbo will replace the old chart with a new one, which is probably not what you want. A more efficient solution would have a JavaScript implementation in the client that receives and applies the updates on always on the same chart. You can use polling or WebSocket as a method to deliver updates to clients.

reghardtp commented 2 years ago

Hi, I have found a nice library that takes HTML tables and turns them into charts. it is working well with Turbo-Flask to create a dynamically updating chart

It is called: charts.css