The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
114 | |
80 | |
78 | |
44 | |
39 |
User | Count |
---|---|
150 | |
116 | |
68 | |
64 | |
57 |