Skip to main content
New Participant
March 15, 2021
Question

Create hover effect in a COVID-19 Graph

  • March 15, 2021
  • 2 replies
  • 443 views

I am failing at making an object follow a path and Null object at the same time. The screenrecording of the graph shows what I am trying to achieve, in theory very simple. I need a dot on the curve of a graph to follow along while the cursor hovers in the graph. I tried to recreate this by using the position data of the path on the y-position of the dot and attaching its x-position to a moving Null. The null was recorded with motion sketch to give the impression of a moving cursor.

Whatever I try there is either an offset or the dot does not follow the shape of the curve properly ... 
How to create the screenrecording as an animation? Is an expression necessary to achieve this?

This topic has been closed for replies.

2 replies

Braniac
March 15, 2021

If your graph is a path you can turn that path into a motion path or use the create Nulls from path script in the window menu to make a Null follow the path.

 

That will lock your marker to the path. You can then use simple expressions to pull the X position from the line and the white position from the motion path.

 

if you are not using a vector path for the graph then there are other workflows. I am not near a computer right now, but when I get back, if no one else has chimed in I will post a couple of screenshots. I do this kind of thing all the time. The create Nulls from path script makes it really easy.

jules5E0BAuthor
New Participant
March 16, 2021

Thanks for the suggestion, I was also thinking that the Nulls from path script could do the trick in some way, however when using the method you suggest I am again running in the issue that is illustrated with the video fail 1 ... I pull the y-position from the motion path but the dot on the path and the line don't move in sync. Any other suggestions?

Braniac
March 16, 2021

Tie the moving bar to the x position of the null that traces the path and the X and Y value of the dot to the null by parenting. 

 

The last step would be to pre-compose the entire thing and use time remapping to control the timing. It will take some keyframes and some easing. 

 

I haven't had time to work out the valueAtTime() and/or other math required to make the null move at a constant speed in X.  

 

If the graph could be generated with a JSON file or even in a spreadsheet, it would be easier to extract the numbers and turn the data into a constant time change. I'm sure that I've done something like this before. I think it was about 8 years ago. I've still got the files but I don't remember the client or the specific project. All that was happening when I had a hand full of corporate clients wanting that kind of animation. 

Braniac
March 15, 2021

Unfortunately, I cannot see any of your videos. Try posting them to YouTube or even Google drive.


And embedded screenshot that shows modified properties of your layer, and a good workflow description would help me help you. I know of about 40 ways to make some thing follow a path. I just don't know which one you are using,

 

Please don't drag and drop screenshots into the icon that says drop files here because it doesn't work very well. Use the tool bar or drag images directly to the reply field on this forum.

jules5E0BAuthor
New Participant
March 15, 2021

Hello Rick,
sure I uploaded the videos to a Drive, you can find them here
https://drive.google.com/drive/folders/1BDsoXiYFsB4q_wMvnVNbwEASQwknDNSG?usp=sharing 

It's really necessary to see a moving image to understand the issues I'm running into and what I'm trying to achieve imo. Hope you can help me on this ... I'm wondering if the origin point plays a role in this. But even then I would probably still run in the issue illustrated with fail 1 ...