How to change the representation as array from Solid as default in Lite protocols?

Hi,

I am using Paraview lite for web. When I load a file in the web, the default representation would come as ‘Solid color’. How to make the array as default (for eg ‘T’)?

I tried working with @exportRpc("pv.color.manager.color.by") and applying it to lite_protocols.py. I tried to set the ‘Solid color’ only as array instead of rearranging the representation. But could not been able to succeed.

Is there any way I could change the representation as Array color first rather than Solid…?

Any leads will be appreciated. Below is the solid color bar which needs to be changed to array as first/default.

Solid color bar to be changed

Regards,
Sunag R A.

You can override the logic when loading your data to pick an array to show. PV-Lite is just reflecting what the server has decided. So just extend the server to do more than the default. Override the default method with your own and do the switch of the field you want to look at based on the data available once loaded.

Hi,

Where can I find the default method related to this content so as to override with the array value extraction while data loading ?

Or do I need to create own protocols using @exportRpc and changing the protocol hierarchy in pvw-lite? If so, how do I do that?

Regards,

Sunag R A.

First figure out which calls are made and in which order by looking at the websocket message in your browser network panel.
Then depending where is the code that protocol/method is defined, you may have the option to override it the way you want.