Deneb Exercise - Radial Plot

I recently saw a post on LinkedIn comparing Deneb with Charticulator when producing a process automation visualization radial plot comparing step time vs. average step time.

Link to Evelyn Münster’s LinkedIn post:

It was mentioned that the calculation of theta values was beyond the original scope, and my understanding of circular charts in Vega-Lite was that they would internally produce all required theta and radius values, so I wanted to see if the example Radial Plot example on the Vega-Lite website could be leveraged to produce something close.

With minimal extra work taking only about a 1/2 hour, here’s what I came up with:

This example uses only pure data (i.e., no DAX measures or calculated columns) from a simple dataset:

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

  1. a formatted and centred “title” block
  2. a transformation to generate a custom label (task, linebreak character, max minutes, min minutes)
  3. the assignment of the max minutes value to both the “theta” (linear) and “radius” (square root)
  4. an “order” block in the “encoding” block to allow custom sorting of the slices (in this case, by ID)
  5. a mapping of the colour scale to the current Power BI theme (i.e., “scale”: { “scheme”: “pbiColorNominal” })
  6. a custom tooltip on the single “arc” mark showing id, task, max minutes, and min minutes
  7. a “lineBreak” property on the single “text” mark to display the custom label on two lines

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 the simple dataset described above as a demo.

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 Radial Plot.pbix (1.7 MB)

3 Likes

marking as solved

Hello everyone! I’m new to Deneb and I’m particularly interested in the Radial Plot Chart. I have a question: Is it possible to assign specific colors to each category on this chart, rather than using the default pbiColorNominal? If so, could someone provide some tips on how to achieve this? Thank you! :grinning:

Hi @ctobon:

It is discouraged to post a new question to a solved thread. Please create a new thread for each new issue, and link to the solved thread if it helps explain your issue.

@EnterpriseDNA, please split this thread at the above post.

Regardless, yes, there are many options for colour schemes in Vega-Lite - here’s three:

  1. Deneb Colour Schemes:
    Deneb exposes 4 options for the use of the current Power BI theme. The original example used pbiColorNominal, but there are 3 more: pbiColorOrdinal, pbiColorLinear, and pbiColorDivergent.

Here’s the encoding\color code block to implement (as used in the original example):

  "encoding": {
    "theta": {...},
    "radius": {...},
    "order": {...    },
    "color": {
      "field": "Task",
      "type": "nominal",
      "legend": null,
      "scale": {
        "scheme": "pbiColorNominal"
      }
    }
  }

Refer to the Deneb website for more details.

  1. Vega Colour Schemes:
    You can use a variety of colour schemes provided by Vega

Here’s a sample encoding\color code block to implement:

  "encoding": {
    "color": {
      "field": "Task",
      "type": "nominal",
      "legend": null,
      "scale": {
        "scheme": "magma"
      }
    },
    "tooltip": [...]
  }

Refer to the link below for more schemes.

  1. Hard Coded Colours:

Here’s a sample encoding\color code block to implement:

  "encoding": {
    "theta": {...},
    "radius": {...},
    "order": {...},
    "color": {
      "field": "Task",
      "type": "nominal",
      "legend": null,
      "scale": {
        "domain": [
          "Shop", "Cook", "Eat", "Clean"
        ],
        "range": [
          "crimson", "navy", "forestgreen", "gray"
        ]
      }
    }
  }

Hope it helps.
Greg
eDNA Forum - Deneb Radial Plot - Colour Options.pbix (1.7 MB)

P.S.: I discussed this (and more) in my Deneb Notes series on LinkedIn last year