In my short career doing data visualization with Power BI, I have always desired the flexibility to do more with my visuals.
So when I came across a demo for Deneb in a meetup last year, I practically lost my head.
![](https://bestanimations.com/Music/Dancers/happy-dance/happy-dance-animated-gif-image-36.gif)
And when I finally got my hands on the visual I was not disappointed.
Deneb, as very well described here, uses Vega and Vega-Lite, a visualisation grammar. I didn’t spend much time reading up on the documentation before I started – I’m way too impatient a person. I mean who reads the instructions on the IKEA manuals anyway?
Chart 1 – Horizontal diverging chart
I had a number of charts that I had been busting to create. So I headed over the Vega-Lite template gallery to pick out some examples that looked close enough in design.
I picked up a pyramid, pasted the template into the editor, mapped the field names then BOOM! Will you look at that it just worked!
![100
Germany
80
United States
80
100](https://kerrykolosko.com/wp-content/uploads/2021/07/image.png)
Okay, okay, so now it’s time to read the documentation. I wanted to add a legend, with a quick search I was able to find how to do that. I made additional cosmetic tweaks here and there which were intuitive enough to do.
Eeeek how exciting.
Chart 2 – Line chart with text labels
The second project was also fairly straight forward.
I began with a simple line graph
![](https://kerrykolosko.com/wp-content/uploads/2021/07/image-7-1024x523.png)
Layered a rectangle mark underneath
![](https://kerrykolosko.com/wp-content/uploads/2021/07/image-8-1024x506.png)
Updated the grid styling and added colour coordinated points
![](https://kerrykolosko.com/wp-content/uploads/2021/07/image-9-1024x381.png)
I next added labels and the ability to highlight values upon hovering over the legend
Magic!
Chart 3 – KPI Cards
The next project began as a desire for more control over KPI style visuals. I often find I have to layer visuals to get the features I want for KPIs, which creates unforgiving navigation experiences.
I didn’t spend too much time on these visual types, but was very excited by the flexibility I had.
![](https://kerrykolosko.com/wp-content/uploads/2021/07/kpis6.jpg)
Chart 4 – Image Plot
The fourth chart was the simplest. Here, I wanted to test how images would render.
I copied a basic template from Vega-Lite Examples gallery and removed the Y-Axis
![< Back to report
Visual Editor
IN Specification
" axis" : null
14
A/ Config
"mark"
" image"
"type" :
"'width" :
"height" :
50
"encodlng '
"field": "Year" ,
@ Settings
4
6
7
8
9
10
11 •
12
13
14
15
16
17
18
19 •
20
21
22
23
In: 24
"type": "temporal "
"field": "order'%
"quantitative" ,
"type" :
"field" :
" img" ,
"type": "nominal"
1940
1945
1950
1955
1960
1965
1970
1975 1980
Year
1985
1990
1995
2000
2005
2010
2015
Col: 2](https://kerrykolosko.com/wp-content/uploads/2021/07/image-3-1024x474.jpeg)
Increased X-axis font size
![< Back to report
Visual Editor
logo Specification
" . 16,
"field": "img"
Col: 59
A/ Config
"type": " image"
"width" :
"height" :
50
"encoding"
"x":
"field": "Year" ,
"axis" :
@ Settings
6
7
8
9
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Ln: 14
"type": "temporal" ,
'titleFontSize
" labelFontSize "
"y"
"field": "order" ,
"quantitative" ,
"type" :
"axis" :
null
"url" :
"type": "nominal"
1940 1945 1950 1955 1960 1965 1970 1975 1980 1985 1990 1995 2000 2005 2010 2015
Year](https://kerrykolosko.com/wp-content/uploads/2021/07/image-4-1024x470.jpeg)
Added tooltip
![< Back to report
Visual Editor
IN Specification
2.
"field": "order",
Col: 20
A/ Config
"data"
"name": "dataset"
"mark" :
"type": " image"
"width" :
"height" :
50,
truel
"tooltip" :
"encoding" :
"field": "Year" ,
"axis" :
@ Settings
3
4
6
7
8
9
10
11 •
13
14
15
16
17
18
19
"type": "temporal" ,
{"titleFontSize"
"labelFontSize" .
16}
. 20,
"type" :
"quantitative" ,
1940 1945 1950 1955 1960 1965 1970 1975 1980 1985 1990 1995 2000 2005 2010 2015
Year](https://kerrykolosko.com/wp-content/uploads/2021/07/image-1-1024x469.jpeg)
Pow!
![Deneb Deneb Deneb
BATMAN!
1966
1940
1944
1948
1952
1956
1960
1964
19
2000
2004
2008
2012 2016](https://kerrykolosko.com/wp-content/uploads/2021/07/image-2-1024x579.jpeg)
Oh so simple and easy to use!
I cannot wait until it hits AppSource!
Very useful content, do you know if it possible to have the vega-lite title dynamic and linked to the dataset. For example have the KPI text in your KPI cards within the vega-lite title?
If I understand you correctly, I don’t believe it’s possible to have dynamic titles and headers.
ok great thanks, I continue to text using marks as you did in your KPI examples
Hi Kerry,
Your content is amazing, thank you for sharing.
I have been looking everywhere to find a way to lock the axis so that it is always visible when scrolling up/down or to the sides. Do you have any content on this yet?
Thank you
Hi Kerry, Great and informative post, thank you for sharing! I have some doubts about which Python library would be best to integrate into my PowerBI development environment. I see you use Deneb seamlessly, which I wasn’t familiar with until a teammate mentioned it. We were considering whether it would be more beneficial to use Deneb over a couple of more famous libraries with greater community support, such as seaborn or matplotlib, for future support reasons. I’m interested in knowing the reason behind your preference for using Deneb. Could you share your insights? Thanks again!