SVG Microchart - Harveyball and Harveybox

Super User
955 Views
Highlighted
Super User
Posts: 1,362
Registered: ‎06-24-2015

SVG Microchart - Harveyball and Harveybox

[ Edited ]

With the August 2018 release it's possible to assign a data category to a measure, this allows to make a measure representing an svg chart 

 

For additional details on the method, please see this post on the DataVeld blog 

or my own post about this microchart.

 

Both visual types the circular "Harveyball" and  angled "Harveybox" are basically comparing two percentages. The Harveyball visual can also be used with just one circle, or better just a segement an arc.

 

Everything is controlled with two of measures

  • Measure Achievement
    This measure controls the larger circle of the Harveyball and the right vertical line of the Harrveybox
  • Measure Achievement
    This measure cotrols the smaller circle of the Harveyball and the left vertical line of the Harveybox.

Replace the calculation with your own calculation and make sure that the measure returns a value >= 0 and <= 1. I tried my best to take some precautions that all other input are treated as an error.

 

This means that you need to copy four measures from the pbix file to your own model

  • Measure Achievement
  • Measure Effort
  • Harveyball (make sure that the data category is set to "Image Url")
  • Harveybox (make sure that the data category is set to "Image Url")

 

After the above mentioned preparations the measures "Harveyball" and/or "Harveybox" can be used inside the table or matrix visual.

 

The measures "Measure Achievement" and "Measure Effort" also provide an "input parameters" here you can configure the color (provide HEX codes) and also if you want to show an element of the visua. The input section looks for the measure "Harveyball" looks like this:

 

 

// input parameters
// Background Circle: represents percentage of current achievements (100% means everything is done)
var ShowBackGrndCircle = TRUE()
var BackGrndPercent = [Measure Achievement] // value has to be >= 0 and <=1// using Firefox one has to use "%23" instead of the "#"-sign
var BackGrndColor = "#D9D9D9" //D9D9D9
// Front Circle: represents effort spent for the current achievements in percent of available ressources (100% means there are no more ressources available)
var ShowFrontCircle = TRUE()
var FrontPercent =  [Measure Effort] // value has to be >= 0 and <=1
var FrontColorGood = "#68CDFE" //68CDFE
var FrontColorBad =  "#E86232" //E86232
// Show text below the circles
var ShowText = FALSE()
var HarveyBallSubtitle = "a measure" //replace the string by a value or string that will be printed

 

Basically the filled arcs and also the polygons of the Harveybox are drawn by using the path element. 

 

I wish you all a lot of fun using this kind of visual.

 

  

 

Hamburg - Germany
If I answer you question, please mark my post as solution, this will also help others.
Proud to be a Datanaut!
Attachment
Regular Visitor
Posts: 76
Registered: ‎03-27-2016

Re: SVG Microchart - Harveyball and Harveybox

[ Edited ]

Thank you, really good a way to present the data. Any Ideas when will it will added to Qucik Measure in Power BI Desktop?

Super User
Posts: 1,362
Registered: ‎06-24-2015

Re: SVG Microchart - Harveyball and Harveybox

Hey,

 

I'm sorry I can't say if it will become a "real" Quick-Measure.

 

Regards,

Tom

Hamburg - Germany
If I answer you question, please mark my post as solution, this will also help others.
Proud to be a Datanaut!
Regular Visitor
Posts: 76
Registered: ‎03-27-2016

Re: SVG Microchart - Harveyball and Harveybox

It would be very easy to use if it make to Quick measure.. Anyways Great Work Sir. Thank you! Smiley Happy