A while ago I tweeted some nice button effects that I created in Tableau. Honestly, there is not any magic. I build them with set action and animation features.
— Kovács Ivett (@IvettAlexa) April 12, 2020
This first tutorial focuses on line animation.
Create a data set in which you define the points to be connected.
I used this dataset with three main fields: Name, X and Y
The first view is a horizontal line that contains the First and Second points.
While the next view gets the Third data point.
We need to keep having the previous – First and Second – marks on the view to get a moving animation in Tableau.
Here is how:
- Create a set based on the dimension.
- Create a calculated field that uses this set.
- Then define a new Y-axis based on the selected point to switch those 2 views by a set action.
If the [Selected Set] = ‘f’ we get the 1st view with each data point, but we assigned 1 as a new Y coordinate to the Third point.
If the [Selected Set] = ‘t’ we get the 2nd view with each data point where we use the original Y coordinates.
- I wanted to use gradient color so I used this calculation to define the color transition.
We are almost DONE! To get the left animated lines, duplicate this view and change the rows and columns.
- Now let’s put together the left- and right views on the dashboard. Set the Set action, and check Animations are enabled.
Let’s check the performance on the Server.
In the next tutorial, I will show how you can create a shadow effect.