This is a migrated thread and some comments may be shown as answers.

Excel Harvey Balls in Telerik Reporting

2 Answers 36 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 1
Greg asked on 09 May 2016, 12:04 PM

How do I create Harvey Balls in Telerik Reporting?

 

https://en.wikipedia.org/wiki/Harvey_Balls

 

2 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 10 May 2016, 02:25 PM
Hi Greg,

Most probably your colleague submitted the same inquiry. Below is a quote from my response:

"The feature is not available in Telerik Reporting. Please feel free to log a feature request for having such in future. Features are considered based on the community demand for them.

I can suggest you the following workarounds:
  1. Use 4 images representing the different values 0-4 and a PictureBox item (can be the Style.BackgroundImage of another item as well). Then use a binding to the Value or BackgroundImage property based on a field that determines which image to be used e.g.:
    //PictureBox item
    Property Path:Value
    Expression: ='http://mysite/resources/'+Fields.[0To4Field]+'.png'
  2. Use a Graph item - How to: Create Pie chart, where you will need to have two values to generate the circle."


I hope this information is helpful.

Regards,
Stef
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Accepted
Greg
Top achievements
Rank 1
answered on 10 May 2016, 09:26 PM

Here is what I ended up using.  Unicode characters producing Harvey Balls:

 

private char GetHarveyBall(decimal percent)
{
//Empty Circle
if (percent < 0.20M)
return '\x25cb';

//Quarter Circle
if (percent < 0.40M)
return '\x25d4';

//Half Circle
if (percent < 0.60M)
return '\x25d1';

//Three Quarter Circle
if (percent < 0.80M)
return '\x25d5';

//Full Circle
return '\x25cf';
}

Tags
General Discussions
Asked by
Greg
Top achievements
Rank 1
Answers by
Stef
Telerik team
Greg
Top achievements
Rank 1
Share this question
or