How to set first output as active?

Dear Paraview developers,
I have a custom plugin that has two output ports: first one is shown via XYChartView, second via SpreadsheetView. When I apply the filter, Paraview creates two layouts and sets the last output port and last layout as active but I want the chart in XYChartView be active. How can one do that?

I figured it out. One should do
server->activeViewSelectionModel()->SetCurrentProxy(viewProxy, vtkSMProxySelectionModel::ProxySelectionFlag::CLEAR_AND_SELECT);