I'm looking for a way control and move a 'drawn' shape or series of shapes across plot (graph builder) using JSL script, this is 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:
- Draw shape(s) required and associate with a variable (could be row value) - we'll call this a frame
- Construct multiples frames, with the shape(s) 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 data filter to scroll which variable is selected and therefore the position of the drawn shape
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, as 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 is being changed.
I'm eager to see if something like this is possible and how this could be coded.