timbod7 / haskell-chart

A 2D charting library for haskell
430 stars 85 forks source link

live plotting #226

Closed teto closed 3 years ago

teto commented 3 years ago

Hi,

I've started using chart in a software of mine and I am really happy with it. I now would like to plot the statistics live (refresh the plot with incoming data), e.g every 100ms for instance. Is it possible with chart ? If yes how ? if not any recommand for a haskell library to do that ?

Cheers

timbod7 commented 3 years ago

Which rendering backend are you using?

If you are using the gtk library for your application there's helper functions in this module

https://github.com/timbod7/haskell-chart/blob/master/chart-gtk3/Graphics/Rendering/Chart/Gtk.hs

to render plots to on screen windows. These can be called periodically to update the display.

teto commented 3 years ago

will reopen if I have issues.