Use a profiler. If you're using GCC you can use https://www.thegeekstuff.com/2012/08/gprof-tutorial/
Easier way which is often enough is simply to put debug output at the beginning and end of your methods/functions with timestamps and then check the output of your application while it is running.
Hello! If I understood correctly, and you want to use the same chart view to represent the data in different forms like bars or line, I don't see any reason why not.
If you take a look at https://doc.qt.io/qt-5/qtcharts-lineandbar-example.html, you can find an example of showing both a bar and line charts in the same chart, at the same time. From there, you can modify to show just one at a time, so in your case switching between the series when the menu action is triggered.
@JonB Hmmmm, i got. actually what i want to do is scrolling my chart. I have about 20 point, and i cant see all of them on the secreen. It shows just up to the size of the axis, and the others cant seen on the secreen. Ekran görüntüsü 2021-01-06 171507.png
There are too many datas on the right but we cannot see.