Simple histogram widget
-
I downloaded and compiled KDChart. Then I tried to launch one of their examples and was welcomed with a bunch of error message ("Must construct a QApplication before a QPaintDevice").
Is this library maintained? -
I managed to get a simple histogram using KDChart.
However the documentation look outdated. They provide a plugin for Designer but it won't load.
Do you still use this library Andre? -
I have performance issues with KDChart. The whole GUI lags when trying to refresh an 256bins histogram at 24fps. A part from that the library is pretty.
I had to downsize my dataset to 64 bins until I find something better. -
I finally wrote my own class.
Currently I kept it very basic. I subclassed QWidget, reimplemented the paintEvent() and called drawLine on my bins.
!http://pix.wefrag.com/i/0/d/f/f/9/4128594b88684c5397acf44930d9bb72.png(histo)!
Now I would like to add a bit of eyecandy and fill the area under the plot with a simple vertical gradient.
Since I need to be able to refresh this ~50 times per seconds, is it risky to add this kind of unnecessary enhancements?
What is recommended, drawing a polygon could be better? -
Okay, I finally replaced my drawLine() calls with a polygon and a simple gradient.
Added a few vertical bars that scales nicely with the widget width.
!http://i.imgur.com/aVryrpB.png(histo nice)!
https://www.assembla.com/code/histogram/subversion/nodes -
Seems very cool!
-
Thanks a lot.
I might share it after a bit of cleanup. -
Code freely available here:
https://www.assembla.com/code/histogram/subversion/nodesFeel free to contribute!