I'm looking for a way to control and move a 'drawn' shape or series of shapes across plot (graph builder) using JSL script, for data visualisation purposes. Think of it as an animation using a series of frames and then scrolling through them to give the impression of movement.
By 'drawn' shape, I mean something like:
Rect ()
I was thinking of taking the following approach, but I'm not sure exactly how to execute this or if there's a better approach:
- Script / draw the shape(s) required and associate them with a variable (which could be a row value) - we'll call this a frame
- Construct multiples frames, with the shape(s) required in different positions, with each frame assigned to a distinct variable
E.g.
Frame 1 - Shape is in position (X+0,Y) and associated with variable (v = 1)
Frame 2 - Shape is in position (X+1,Y) and associated with variable (v = 2)
Frame 3 - Shape is in position (X+2,Y) and associated with variable (v = 3)
- Use local data filter to scroll which variable is selected and therefore the position of the drawn shape(s)
I'd hope that this, as described in my example, would give the impression of the shape moving in direction X+.
As aforementioned I am unsure that this would work, the graph builder report would need to be updated / refreshed somehow to remove the old drawing (overwritten) in place of the new one when the variable selected is being changed.
I'm eager to see if something like this is possible and how this could be coded.