You could build a wrapper object and add there booleans or a enumeration for visibility constraints. The buttons will then change the related settings of the wrapper object. You can show then different charts related to the visibility settings.
To implement a chart, see the documentation about chart configuration: https://docs.mendix.com/refguide/charts-configuration#1-introduction
To switch between chart with a button you have got a couple of options:
- Use a enumeration or boolean and apply condition visibility on 1 page between the charts: https://docs.mendix.com/studio/page-editor-widgets-visibility-section#1-introduction
- Show different pages with different charts