Any suggestion for keep logs and show statistics?



  • Hi, my test program has a callback function and produces both text and number data. I need to keep logs, and show some statistics. Such as i would like to show the average of numbers, hourly and daily. I have a QStackedWidget for this, there is two page, first is for hourly and second is daily statistics. I need some suggestion about that.

    By the way, i want to show that average or ratio on a QChart(maybe donut chart), but as far as i know, it's not easy to update QChart at runtime. llluminate me about that, and show me a proper way senpais, thanks in advance.


  • Qt Champions 2017

    If your interest is show only one at a time either logs or statistics, then stack widget is best choice. I prefer to show using tabs with logs & statistics where both options are visible for the selection.

    You can update you the charts. Search in this forum. This question is asked many times, ppl suggested answer.



  • I was busy with some memory management stuff last days, sorry for late reply. Thank you Mr. @dheerendra for your reply. I'd like to see another replies from other experienced guys and Qt specialists :)



  • @R_Irudezu

    For me it's quite difficult to give a suggestion, how you should visualize or store your data. It depends on: what kind of application, what kind of data, is the data essential or just nice to have, ...

    But in general ...
    If the data or values need to be stored, I would use a database, locally or remotely.

    To visualize I would use the QCharts or QDataVisualization module.

    There are good articles in the Qt documentation about how to use it:
    https://doc.qt.io/qt-5.11/qtcharts-overview.html
    http://doc.qt.io/qt-5/qtdatavisualization-overview.html

    There is also an example for dynamically update the data of an spline chart: https://doc.qt.io/qt-5.11/qtcharts-dynamicspline-example.html

    I think you can apply it to a Donut-Chart.

    Hope this helps.



  • thank you so much for information @beecksche i will check it out


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.