[{"id":"a20f26ac-cd31-4e4d-9454-1e035b0f1587","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"3604b8ce-1da0-413f-8274-7df0f7173573","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"7fce7040-1bb1-4a61-9fb7-2e19d569de50","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"0eb72dd3-8f8f-4039-93a8-500bbde2301e","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"ac046cee-82b9-4edf-a642-ae6d7cb21ebf","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"75b66fd4-b740-443d-bc6e-1782048b60a6","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"dde44832-bb5c-45f3-8ebf-3badbc613cd9","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"43de3664-261b-4cf9-9945-fb519251f4c7","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"2f064d57-b088-4bc5-a628-4e0d7e1a0c65","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"f290406b-ced1-4c52-abad-979160a79f6b","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"1864834b-08ce-43f1-891b-c3cca6e04e95","tags":[{"product":null,"links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e","name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"f96cfec1-420c-4ca7-ab0a-cab482731073","tags":[{"product":null,"links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e","name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"3f2ea860-c764-43d8-ae3f-6e3b0314ce67","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"81eb70e8-f770-4384-9167-bc7c755ad052","tags":[{"product":null,"links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e","name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"d0dff477-9f56-483a-a9fc-cab648905b41","tags":[{"product":null,"links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e","name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"793a62d7-460d-4699-9304-edb2941268ac","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"2d6ebfad-f7d1-4cc5-8ba1-fdace3472056","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"c8c7b5d5-f5bd-4b68-a12f-3aae9804a844","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"577a09da-dea1-42db-812f-4eeaa9274ece","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"8ddd80d5-886f-41b8-8e3f-f73aa8146c8d","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"e0909540-8bde-4587-bb4d-02445746db2a","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"464b8e03-462d-4aed-8818-05d32ec3bf00","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"f235557b-9781-471f-bf03-38bae6e3e953","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"fd5d021d-0210-4d74-ba42-1a39ef14a385","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"548568fe-dbd1-4da5-a489-d9b3edf75329","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"a0c823ed-e22b-493b-aded-4d201c0fa480","tags":[{"product":null,"links":null,"id":"fe610228-9cf6-417f-813a-dcbfd25406c3","name":"upd","color":"#7e678a","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"d19bc9cd-ff53-4b0d-ab7e-a68c1497c4c6","tags":[{"product":null,"links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e","name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"94759fce-692f-4779-b5f3-fce5c58f242c","tags":[{"product":null,"links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e","name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]},{"id":"27658163-a479-432f-a192-dbed286beb3e","tags":[{"product":null,"links":null,"id":"4d7b6a40-ab32-4c71-a381-58f3ffd2653e","name":"new","color":"#ed7422","productId":"d699a6af-e150-4da3-ab30-25fd97934601"}]}]
The Pie
and Doughnut
plots are suitable to show how the parts of a whole compare to each other in size.
A Pie
plot encodes Data Values
into disks divided into slices.
A Doughnut
plot encodes Data values
into rings divided into segments.
In both cases, the slice or segment's arc length is proportional to the corresponding part of the Data Value
. The examples below emphasize Data Values with a bold font and their Parts - with an italic font. Also, we will use the term circular sector
for both disk slices and segments of a ring.
A single value pie plot visualizes parts of one data value.
For instance, the Pie Plot Demo shows contribution of product categories into the Net Sales.
You could also display several values divided into common parts using a Pie or Doughnut plot.
For example, the Doughnut Plot Demo shows contribution of product categories into the Discounts, Returns, and Unit Cost.
This configuration places doughnut segments next to each other, creating a circular-shaped bar plot.
For instance, the Circular Bar Plot Demo shows contribution of sales channels into the Net Income.
You can configure all these types using the Pie
template and its properties described in the following sections. The Doughnut
template is just a shortcut to a pre-configured Inner Radius
property value.
You can use the following demos to explore plot properties - open a link, toggle the Report explorer, select the Plot - Plot 1
node and use the Properties panel to modify the configuration.
You could also download the report files listed below and open them in the Standalone Report Designer.
If you add a chart into a report, set the plot type to Pie
or Doughnut
on the first page of the Chart Wizard
, and click the Next
button, the wizard shows the Pie Settings
or Doughnut Settings
page that looks like the following:
The Data Values
section allows you to add one or more Data Values.
The Data Categories
section allows you to configure the Details Encoding.
The Values
collection of a Pie plot determines the data value you want to break down into parts. The collection items consist of two properties:
The Value
is usually a bound field reference. The Properties Panel displays the Value
as the collection, but Pie
and Doughnut
plots take the first item only. The Chart Wizard displays Value
as Field
.
The Aggregate
is an optional function, such as Count
or Average
, that reduces many field values into a single one.
For instance, the Pie Plot Demo has the Value={SalesAmount}, Aggregate=Sum
Data Value.
The Details Encoding
breaks down data values into parts specified in the Details
collection of items consisting of several properties:
The Values
is usually one or more bound field references. Bound DataSet Records with the same values of these fields fall into the same part. Data Values within each part are reduced into a single value by applying the Aggregate
function. For instance, in the Pie Plot Demo
, the Details
value is {ProductCategory}
. Consequently, the disk representing the Net Sales
breaks down into multiple circular sectors corresponding to distinct product categories.
The Exclude Nulls
flag indicates whether DataSet Records with an undefined Details Value
should be excluded from the visualization.
The Group
property determines how the plot arranges circular sectors.
Stack
- This is the default value. The Pie Plot
divides disks into slices. The Doughnut Plot
divides rings into segments.
Cluster
- A plot places circular sectors next to each other creating a Circular Bar.
None
- equals to Stack
.
The Sorting
configuration determines the order of circular sectors' appearance.
Note: Pie
and Doughnut
plots take only the first item of the Details collection and ignore the rest
The Chart Wizard offers the simplified editor of the Details Encoding in the Data Subcategories section:
A single Details Encoding
item is available.
A single Value
item displayed as Field is available.
The Group property of the Detail Encoding is displayed as the Break-down
method.
The Sorting configuration of the Details Encoding displays the Sort direction property only. The Sort Expression is automatically set to the Field value.
The Colors Encoding
enables the color legend of the Details Encoding
and includes the Color
expression and the optional Color Aggregate
function that reduces many Color
values into a single one.
The plot calculates distinct Color Encoding
results for parts produced by the Details Encoding
, converts them to fill color of corresponding circular sectors, and displays the match between colors and encoding results in the legend. Colors come from the Chart Palette.
For instance, the Pie plot demo uses the {ProductCategory}
expression for the Colors Encoding. Consequently, the report output shows the colors legend that matches Product Categories with the corresponding slices' fill color.
Note: The Color
property is the collection, but the Pie
plot takes the first item only.
The following properties allow you to fine-tune the outfit of circular sectors that form a Pie
, Doughnut
, or Circular Bar
plot. You can see their effect in action by modifying the configuration of any demo.
The Opacity
is a number in percentage that determine the opacity of circular sectors filled with color. 100%
means they are opaque, and 0%
means that they are entirely transparent.
The Inner Radius
is a number in percentage of the outer radius that defines the size of a hole in the center of the disk. For instance, in the Doughnut Plot Demo, this property is set to 20%
.
The Offset
is a number in the percentage of the arc length that defines the size of the gap between circular sectors in a Pie or Doughnut plot. Try setting this property to 10%
in the Pie Plot Demo to see its effect.
The Start Angle
is a number in arcdegree that defines the rotation of the plot clockwise. Full rotation is 360
degrees.
The Sweep
is a number in arcdegree from 0
to 360
that determines the arc length occupied by the plot. For example, in the Circular Bar Plot Demo, this property is set to 270
.
The Clipping Mode
indicates the manner that the plot area draws a plot:
Fit
value means that the plot area should use all the available space to fit the plot
Clip
value means that the plot area cuts off the plot on the edge of its right or bottom padding
None
value equals to Fit
The line properties in the Style
section determine the appearance of circular sectors borders.
The color expression in the Background
section sets the fill color of circular sectors and overwrites the Color Encoding
described earlier.
The Text Encoding
collection offers a way to configure pie and doughnut plots to display customized labels and tooltips on the circular sectors. Each item within this collection has the following properties:
Values
: This is an expression that can reference the values of the bound fields.
Aggregate
: This optional function, such as Count
or Average
, can condense multiple field values into a single value, evaluated within the current detail or category context.
Template Key
: A string used within the Labels or Tooltip template to represent the text encoding item.
Target
: This property specifies whether the text encoding item is meant for the plot's labels or tooltips.
Adding items to the Text Encoding
collection allows automatic display of configured values in Labels or Tooltips, based on the Target
value of each item. To further customize the text of the labels and tooltips, you can employ the Tooltip Template
and Label Text Template
expressions.
Apart from Text Encoding items referenced by their keys, you can utilize the following pre-defined values:
{valueField.name}
: Represents the field name bound to a Data Value.
{valueField.value}
: Represents the current Data Value within the containing Category or Details.
{PercentageDetail}
: Represents the percentage share of the current Data Value among all values within the same Details.
{detailFields.name}
: Represents the field name bound to the Details Encoding.
{detailFields.value}
: Represents the current Details Encoding value.
{colorField.name}
: Represents the field name bound to the Color Encoding.
{colorField.value}
: Represents the current Color Encoding value.
These values can be combined and formatted using the interpolation syntax and supported format strings that are also used for the TextBox Report Item.
For example, the plot in the Pie Plot Demo uses an advanced tooltip configuration:
The Text Encoding
contains the SalesQuantity
element that displays the number of sold items:
Aggregate
= Sum
Value
= {SalesQuantity}
Target
= Tooltip
TemplateKey
= SalesQuantity
The Tooltip Template
is configured with the following expression:
{detailFields.value}
Quantity: {SalesQuantity}
Amount: {valueField.value:C2}
A subset of text properties in the Label Text
section and the line properties in the Label Border
section allow you to set up the corresponding visual parameters of the plot labels.
The Label Position
and an optional Offset
in pixels determine the location of labels relative to a parent circular slice:
Inside
- on the edge
Outside
- outside
Center
- inside, on the center
Auto
- equals to Outside
The Overlapping Labels
property indicates the handling of overlapping labels. Possible values are:
Auto
- hides some labels to prevent the overlapping
Show
- shows all labels even if the overlapping persists
The line properties in the Label Line
section allows you to add the connecting lines between labels and their parent circular sectors. The Label Line Position
determines the starting point of the line relative to the sector:
Auto
- on the edge
Center
- on the center
The Rules
configuration allows you to create if this then that
rules based on one or more data conditions to apply to the plot appearance. A condition is an expression that may refer to one of the following values:
Chart!CurrentData
- the current Data Value
Chart!PreviousData
- the previous Data Value
Chart!NextData
- the next Data Value
Chart!CurrentCategory
- the current Category Encoding
value
Chart!PreviousCategory
- the previous Category Encoding
value
Chart!NextCategory
- the next Category Encoding
value
Chart!CurrentDetail
- the current Details Encoding
value
Chart!PreviousDetail
- the previous Details Encoding
value
Chart!NextDetail
- the next Details Encoding
value
A condition expression can also include references to report parameters and standard operators. The easiest way to build a condition is to use the expression editor that you can open by click on the box on the right side of the Condition
property.
The following visual properties of Pie
and Doughnut
plots can be applied when a condition is met:
The background color of a disk slice or a ring sector
The color of the disk slice or ring sector border
The width of the disk slice or ring sector border
The style of the disk slice or ring sector border
The tooltip and label template
For instance, you can set the following rules for the plot in the Pie Plot Demo to set a custom label template for the Computers
sector:
where the custom label template is {PercentageCategory:p2} ({valueField.value:C2})
As a result, the output of the chart will be like this:
This group of properties determine the Interactive Action when a report reader clicks inside a circular slice. You can use bound field references to pass parameters in a drill-through report or configure a dynamic bookmark or URL. The field value is evaluated in the scope of the current detail. Visit the Drill-Through Reports Walkthrough for more information. It explains how to set up the drill-through column plot, but the same technique is applicable for a pie plot.