Loader for graphs, charts

Hello,

I would like to share a way to put a loader in big graphs.

1.- Add a script transform to the binded data


	system.perspective.sendMessage(
		messageType="startLoading",
		scope="view" 
	)
	
	
	return value

2.- Add another script at the end of all data flow

	system.perspective.sendMessage(
						messageType="finishLoading",
						scope="view"
					)
			
	

3.-In configure scripts add the message handlers startLoading and finishLoading

startLoading:
def onMessageReceived(self, payload):

	system.perspective.openPopup(
	    id="isLoadingGrafica-popup", 
	    view="Page/IsLoadingGrafica",
	    title="",
	    width=273,
	    height=128,
	    overlayDismiss=False,
	    modal=False
	)
--------------------------------------------------------------

finishLoading:

def onMessageReceived(self, payload):

	system.perspective.closePopup(id="isLoadingGrafica-popup")


4.- setup your popup screen as you wish IsLoadingGrafica

image

This way user will always now something is going on while large graphs are loading.

Cheers!