Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello everyone,
I try to recreate an animated bar chart by using deneb (https://vis.csail.mit.edu/pubs/animated-vega-lite/). I adjusted the code at some points, to fit it with my sample data. Unfortunately, I get an error 'Duplicate signal name: Year_tuple. I didn't succeed to fix this error. Hopefully, one of you can help me out. The sample data can be found here.
The code used for the Deneb visualization is as follows:
{
"data": {"name": "dataset"},
"encoding": {
"color": {"field": "Category", "legend": {"offset": 80}},
"x": {"field": "Value", "type": "quantitative"},
"y": {
"field": "Brand",
"type": "nominal",
"sort": {"field": "Value", "order": "descending"},
"axis": false
},
"time": {
"field": "Year",
"scale": {"type": "band", "range": [0, 400]},
"key": {"field": "Brand"},
"rescale": true
}
},
"params": [
{
"name": "Year",
"select": {"type": "point", "on": "timer"},
"bind": {"input": "range", "min": 2021, "max": 2023, "step": 1}
}
],
"transform": [
{"calculate": "+substring(datum.date,0,4)", "as": "year"},
{"calculate": "+datum.Value", "as": "value"},
{
"sort": [
{"field": "year", "order": "descending"},
{"field": "value", "order": "descending"}
],
"window": [{"op": "rank", "as": "rank"}],
"groupby": ["year"]
},
{"filter": {"param": "year"}},
{"filter": {"field": "rank", "lte": 10}}
],
"layer": [
{"mark": "bar"},
{
"mark": {
"type": "text",
"align": "left",
"baseline": "top",
"dx": 3,
"dy": 4
},
"encoding": {"text": {"field": "Brand"}}
}
]
}
Solved! Go to Solution.
Hi @Anonymous, although the Vega team is working on bringing animation to Vega and Vega-Lite, it is not officially available yet, so Deneb is not able to use those features. However, you can implement animations using timers in Vega, but the level of effort involved is quite significant.
The link below is an example where I'm doing zoom-on-click animations (a downloadable version of the .pbix is attached). The easing for the animations, as well as the resizing and positioning of all the nodes are recalculated upon each click. Currently there is no way to do this in Vega-Lite as timers are only currently available in Vega.
https://community.fabric.microsoft.com/t5/Data-Stories-Gallery/Where-is-Everybody/m-p/3566465#M11602
Hi @giammariam , thanks for your reply. Pity to hear that animations are not available yet.
Awesome visual btw, I am sure that it took you some effort to create that!
Hi @Anonymous, although the Vega team is working on bringing animation to Vega and Vega-Lite, it is not officially available yet, so Deneb is not able to use those features. However, you can implement animations using timers in Vega, but the level of effort involved is quite significant.
The link below is an example where I'm doing zoom-on-click animations (a downloadable version of the .pbix is attached). The easing for the animations, as well as the resizing and positioning of all the nodes are recalculated upon each click. Currently there is no way to do this in Vega-Lite as timers are only currently available in Vega.
https://community.fabric.microsoft.com/t5/Data-Stories-Gallery/Where-is-Everybody/m-p/3566465#M11602
User | Count |
---|---|
116 | |
73 | |
62 | |
50 | |
46 |
User | Count |
---|---|
173 | |
123 | |
60 | |
59 | |
57 |