on 05-25-2016 9:48 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 ?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 ?
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.