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.