cancel
Showing results for 
Search instead for 
Did you mean: 

Storing session properties of custom visualisation.

Former Member
0 Kudos

When a user is interacting with a custom visualisation is there a way to store programmatically details about their session. Such as zoom level or last item zoomed on so that it can be rendered back to the original state when reopening or sharing the document ? Looking at the arguments to the render function only properties looks like it might be a fit but I'm not sure if this is supported.

ideally this would be serialized on close and read back when reopened and rendered in the LUMS document.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

vincentdechandon
Contributor
0 Kudos

You can theorically save whatever you want in the SDK custom properties, even if there is no UI control in front of it.

However, it won't be saved per user but per visualization.

Also, it's not officially supported in the Visualize room, but some workaround can be put in place, and by respecting a given workflow you can make it work.

Br,

Vincent

Former Member
0 Kudos

Vincent.

Thank you. That's great to hear. Indeed I have been able to read the property during render but that's when I posted this question. I am able to read the property but my issue is in updating it for being able to restore on the next load of the LUMS file. I'd prefer not have to expose them via the compose room.

Could you elaborate on the way to "make it work" ? The SDK does say to use the VizInstance but in this case does that still apply ?

vincentdechandon
Contributor
0 Kudos

It would take too much time to explain in details there how you can achieve it.

What really matters is that if you store something in the properties (for example, doing this.properties().my.property = "test" in the render function) within the stack that is called when Lumira renders the viz (after adding a dimension in a feed for example), there is a high chance the property will be saved with the visualization. Then you have to implement something like a "cache system" to transfer your property values from the Visualize Room to the Compose Room.

For example, at Galigeo we have developed such system.

This video shows what you want to achieve I think.

Br,

Vincent

Former Member
0 Kudos

thanks Vincent. That makes sense.

Answers (1)

Answers (1)

varunanand
Contributor
0 Kudos

Hi Grant,

I think we can get most of the features that you ask for by using the bookmark feature. Please refer to


But this is only for the server and not the desktop version.


Thank you,

Varun Anand

Former Member
0 Kudos

Varun,

Thanks for the reply. Not sure that will work for my scenario as these are custom HTML controls. Really what I would need to do is serialise the state (be it in JSON or otherwise) into the document.

Especially since I want them to be available in story mode as well.

Is there no option for this at all ?