Deneb Example - Augmented Bar Chart

A simple bar chart can be augmented using Deneb/Vega-Lite to increase the insights available “at-a-glance”. The below example presents country populations ranked over time (historical and projection), and uses colours and rank labels to enhance the display of 2023’s top 5.

This example illustrates a number of Deneb/Vega-Lite features, including:
0-Common Features:

  • • use of transform blocks to extend the dataset with in-visual calculations of the world population and individual country population rank and to filter the display to the yearly top 20
  • • use of three vertically-concatenated visuals: bar chart (population), linear gauge (year), and footnote

1-Bar Chart:

  • • use of a custom scale for the X-axis to consistently display and enhance the comparison of data values between years
  • • use of bar corner rounding
  • • use of a custom color block to display a country primary colour for 2023’s top 5 countries (remainder in light-grey)
  • • use of Deneb’s implementation of Power BI formatting for country population data labels
  • • use of a custom tooltip block to display the country, population, and rank
  • • uses a 50% transparent circle mark to provide a background for the country rank (2023’s top 5 only)
  • • uses a text mark to display the country rank (2023’s top 5 only)
  • • use of fixed-position text marks to display the year and world population

2-Linear Gauge:

  • • use of a point mark with an inverted triangle symbol to identify the current year on a custom “scale” for the year range (1950-2100)

3-Footnote:

  • • use of a single text mark with hard-coded label, hard-coded X-position value, and dynamic Y-position value (reflective of the container height)

The intent of this example is not to provide a finished visual, but rather to serve as a starting point for further custom visual development.

Also included is the sample PBIX using a dataset from the United Nations consisting of historical actuals and future projections of country populations for the 1950-to-2100 period. (Country names can change over time, and the UN dataset was slightly modified to enhance display; as the purpose of the example was to demonstrate Deneb/Vega-Lite features rather than to analyze the UN dataset, this is not considered significant.)

This example is provided as-is for information purposes only, and its use is solely at the discretion of the end user; no responsibility is assumed by the author.

Greg
Deneb Examples - Augmented Bar Chart.pbix (3.2 MB)

3 Likes

Marking as solved

Thank you @Greg!