Introduction
For this last week of March, we are continuing our project management theme.
The challenge this week is to use Deneb to build bullet charts using the provided data. Bullet charts were created by Stephen Few to offer an alternative to clunky gauges. Bullet charts are used to compare a featured measure to one or more related measures in a small amount of space. You can read the original design specification for bullet charts here.
While there are a few custom visuals that can help you create a bullet chart, we are going to make our own using the Deneb custom visual. Deneb allows developers to use the declarative JSON syntax of the Vega or Vega-Lite languages to create their own data visualizations. If you aren’t familiar with Vega-Lite, you can check out an example bullet chart here to help you get started.
Requirements
- Retrieve the data from data.world.
- Sort the metrics by the [Metric Order] column
- Using a single Deneb custom visual, create a set of 8 bullet charts (one for each metric) that show the current results as a bar, the previous month results as a bar, and the goal as a tick.
- Use colorblind friendly colors.
- Set the color of the actuals bar based upon whether the metric actual value is meeting the goal. Note that there are some metrics where being below the goal is good (as noted by the [High is Good] column).
- Use independent scales for each bullet chart.
- Set the tooltip on the Deneb visual to show Actual, Goal, and Prev Actual when hovering over any data point in a bullet chart.
- Create a legend to explain the marks used in the bullet charts.
- Add a visual that displays the last updated date. Use the max [Reporting Date] value.
Dataset
This challenge uses data provided on data.world specifically for this exercise. You can use the data.world connector in Power BI (recommended) or download the Excel file to your local machine. You will need to log in to data.world to retrieve the data, but accounts are free.
Share
After you finish your workout, share on Twitter using the hashtags #WOW2022 and #PowerBI, and tag @JSBaucke, @MMarie, @shan_gsd, @KerryKolosko, and @NerdyWithData. Also make sure to fill out the Submission Tracker so that we can count you as a participant this week in order to track our participation throughout the year.
Is the order of metrics correct in the solution and shared PBIX? It is alfabetical in the solutions. In the datasource if you look at Metric Order it makes it different.
I set the Sort By Column on the Metric column to be Metric Order instead of natural alpha order on the Metric column.
Can someone share the pbix file that was used for this. It will help us get this going.
thanks!
Hi David – the json that Meagan used in the Deneb visual is linked here. You can also find a sample .pbix from our friend Thys over on his GitHub page. I hope this helps!
interesting thank you very much, it is possible to format each of the scales, for example if it is in percentage, in whole numbers, or in coins… I appreciate an example
Good question. I haven’t tried it. The scales are independent so the numbers don’t have to be the same. The actual labels are part of the encoding of the x axis. There is a property on the axis label called labelExpr that looks pretty promising. That is what I would try.
ok, thanks a lot for the idea, I’ll try it