[]
The Pie
and Doughnut
plots are suitable to show how the parts of a whole compare to each other in size.
Pie
plot encodes Data Values
into disks divided into slices.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.
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:
Value
is usually a bound field reference. Note: This property is the collection, but the Pie
plot takes the first item only.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:
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.Exclude Nulls
flag indicates whether DataSet Records with an undefined Details Value
should be excluded from the visualization.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
.Sorting
configuration determines the order of circular sectors appearance.Note: The Pie
plot takes only the first item of the Details collection and ignores the rest
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 plotClip
value means that the plot area cuts off the plot on the edge of its right or bottom paddingNone
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.
Circular sectors can display tooltips and labels with the following content that you can set up using the Tooltip Template
and Label Text Template
expressions, respectively.
You can choose one of the following values in the drop-down list.
Value Field Name
usually means the field name bound to a Data Value
.Value Field Value
means the current Data Value
within the containing Category or Details.Percentage In Details
means the percentage share of the current Data Value
among all the values with the same Details
.Details Field Name
usually means the field name bound to the Details Encoding
.Details Field Value
means the current Details Encoding
value.Color Field Name
usually means the field name bound to the Color Encoding
.Color Field Value
means the current Color Encoding
value.Also, you could use the template's Expression Editor to set the formatting for these values using the interpolation syntax and supported formatted strings. For instance, you can set the Label Text Template
to {valueField.value:C2}
in the Pie Plot Demo to display Net Sales per product category as currency.
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 edgeOutside
- outsideCenter
- inside, on the centerAuto
- equals to Outside
The Overlapping Labels
property indicates the handling of overlapping labels. Possible values are:
Auto
- hides some labels to prevent the overlappingShow
- shows all labels even if the overlapping persistsThe 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 edgeCenter
- on the centerThis 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.
Submit and view feedback for