You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am new to vegafusion, but when I investigate this repository I have the following question
The scenario:
When I want to render a spec in the frontend, I may want to split the spec into the server part and frontend part, so that if the frontend part changes, there is no need to send the spec to the server.
For example, if I were to render a heat map, then:
Since scale expression is not supported by vegafusion, I may keep the color and scale parts in the frontend, and send the rest of the spec to server
Server vegafusion further call pre_transform_spec to processes the spec, and then send the transformed spec back to frontend
The spec sent back and those color and scale are merged into one spec, then being rendered by the frontend
The benefit is, when user changes the color or scale, there is no need to resend the spec back to server, the transformed spec will be reused directly.
NOTE: I am not sure whether color and scale is really not processed. I just want to illustrate that in my understanding there are 2 parts, one that is transformed by vegafusion and one that doesn't need to leave the frontend.
Now I have the following questions:
Is my understanding correct? If so, how do I know which parts of the spec can be kept in the frontend? Is there a list of spec keys?
Except from calling pre_transform_spec, are there any other APIs suitable for such a scenario?
Does the provided jupyter widget support the pattern, or in the widget each change of the spec will be sent back to the server
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I am new to vegafusion, but when I investigate this repository I have the following question
The scenario:
When I want to render a spec in the frontend, I may want to split the spec into the server part and frontend part, so that if the frontend part changes, there is no need to send the spec to the server.
For example, if I were to render a heat map, then:
scale
expression is not supported by vegafusion, I may keep the color and scale parts in the frontend, and send the rest of the spec to serverpre_transform_spec
to processes the spec, and then send the transformed spec back to frontendThe benefit is, when user changes the color or scale, there is no need to resend the spec back to server, the transformed spec will be reused directly.
NOTE: I am not sure whether color and scale is really not processed. I just want to illustrate that in my understanding there are 2 parts, one that is transformed by vegafusion and one that doesn't need to leave the frontend.
Now I have the following questions:
pre_transform_spec
, are there any other APIs suitable for such a scenario?Beta Was this translation helpful? Give feedback.
All reactions