Reputation: 89
I have the following data:
Server | GB
Server 1 | 500
Server 2 | 1
Server 3 | 15
Server 4 | 2
With the piechart that is setup as a CollectedPie with a percentage threshold of 2
Result is the following:
As you can see there is a nicely collected piechart for Server 2 and 4. However with just 2.90% of GB used by Server 3 I also want to include it into the collected piechart. When the CollectedThreshold is updated to 2.90 or above it will fail to collect.
As you can see it will not collect when the piechart will have 1 normal slice and 1 collected slice exploded into a different piechart for those details.
When changing the details to single slice instead of collected one observes the following result:
As I have to create a few more of these charts I want to make sure I can always collect them and not have to manually make sure it has atleast 2 slides outside of the collected pie. Anyone encounted this problem and possibly has an anwer?
Upvotes: 3
Views: 561
Reputation: 2146
This one was bothering me so I took a look at it with the following simple query based on your data.
CREATE TABLE #temp1 (Server VARCHAR(10), GB INT)
INSERT INTO #temp1 (Server, GB) VALUES
('Server 1', 500), ('Server 2', 1), ('Server 3', 15), ('Server 4', 2), ('Server 5', 100)
SELECT * FROM #temp1
You may notice that I added a fifth value to the dataset for 'Server 5', 100
. Something occurred to me while testing with your dataset and that was that perhaps SSRS wouldn't explode out to a second pie if there is only one value NOT collected. This appears to be the case. With a fifth point of data -- leaving two slices and the 'Other' slice, the 'Other' slice explodes out.
I can't find anything in the documentation about this behavior, but this seems to be the problem. My proposed solution would be to potentially split the largest slice into two equal parts and simply add the same color to each of those slices. The Color
property of the chart should be set something like this expression.
=IIF(Fields!Server.Value = "Server1" OR Fields!Server.Value = "Server5", "Blue", "#00000000")
This expression specifically sets the color for the split slices and otherwise uses automatic coloring.
You then may need to set the CollectedColor
property to something else to avoid the entire main chart being the same color. The only issues I've seen with this method is that there is a label in the Legend for whatever the second part of the main chunk is and there's a border separating the split slices. With some fiddling, you may be able to find a work around for that such as making the main chunk black with black borders.
Upvotes: 3