Deneb Exercise - Ticker (using Vega)

One of the automatic display features built-in to the Vega language and enabled in Power BI by the Deneb custom visual is the use of timers to adjust the display without user interaction. Here’s an example of a simple sales by country ticker:

deneb.vega_ticker.0.2

This example uses a number of Deneb/Vega components, including:

  1. a filter transform to return only the “top n” records in the provided Power BI dataset (i.e., the “first” dataset)
  2. a second dataset filtered to only a single record from the “first” dataset
  3. in-visual formulae to calculate both the percent difference and direction between the current year (CY) and previous year (PY)
  4. an in-visual formula to concatenate the rank, country, CY sales, and PY percent difference
  5. a number of “signals” which define the intervals and use timers to control the display
  6. an “opacity” signal to permit a fade-out/fade-in of each ticker entry
  7. a “color” scale to define the positive and negative colours
  8. a single text mark to present the concatenated text in the appropriate colour and with variable opacity (transparency) to provide the face-out/fade-in effect

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

Also included is a sample PBIX using a small simple Sales dataset as a demo.

This feature, along with many others, becomes accessible in Deneb when the lower-level Vega language is used (as opposed to the higher-level Vega-Lite language).

NOTE: This exercise 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 - Ticker.pbix (1.5 MB)

6 Likes

This post is part of the Enterprise DNA platform initiative to provide information about Deneb Exercise.

To ask any questions on the content covered in this category please start a new topic within the forum. You may check this how-to guide for reference - How To Use The Enterprise DNA Support Forum

Thank you