Donut Chart
- Getting Started
- Setting Up ASP.NET Core MVC
- Accessibility
- Chart
- ASP.NET
- Overview
- Getting Started
- Design-time Support
- ItemTypes
- Chart Elements
- Chart Types
- Area Chart
- Bar Chart
- Bubble Chart
- Line Chart
- Pie Chart
- Sparklines
- Donut Chart
- Scatter Chart
- Spline Chart
- SplineArea Chart
- RangeArea Chart
- RangeBar Chart
- RangeSpline Chart
- StepLine Chart
- StepArea Chart
- PolarLine Chart
- PolarArea Chart
- PolarBar Chart
- PolarSpline Chart
- PolarSplineArea Chart
- PolarScatter Chart
- Combining Chart Types
- Data Binding
- Exporting
- Localization
- Selection
- Zooming and Panning
- Appearance and Styling
- Server Side Events
- Client Events
- Supported Browsers
- ASP.NET Core
- ASP.NET MVC
- JAVA Apache Wicket
- API
- allowUTCFormatting
- applyAnimation
- axisX
- axisTickText
- axisType
- categoricalValues
- decimalTicks
- drawColor
- drawWidth
- endOffset
- fixedEnd
- inverseOrder
- max
- min
- minorPlotStripColor
- minorPlotStripDashStyle
- minorPlotStripWidth
- minorTicksColor
- minorTicksHeight
- minorTicksRepeat
- minorTicksWidth
- offset
- plotBands
- plotLines
- plotStripColor
- plotStripDashStyle
- plotStripWidth
- startOffset
- swapLocation
- ticksColor
- ticksHeight
- ticksPlacement
- ticksRepeat
- ticksWidth
- title
- axisY
- axisTickText
- axisType
- decimalTicks
- drawColor
- drawWidth
- endOffset
- fixedEnd
- inverseOrder
- max
- min
- minorPlotStripColor
- minorPlotStripDashStyle
- minorPlotStripWidth
- minorTicksColor
- minorTicksHeight
- minorTicksRepeat
- minorTicksWidth
- offset
- plotBands
- plotLines
- plotStripColor
- plotStripDashStyle
- plotStripWidth
- startOffset
- swapLocation
- ticksColor
- ticksHeight
- ticksPlacement
- ticksRepeat
- ticksWidth
- title
- backgroundColor
- borderColor
- borderRadius
- borderWidth
- chartAreaBackgroundColor
- chartAreaBackgroundImage
- chartAreaBorderColor
- chartAreaBorderWidth
- chartAreaPaddingBottom
- chartAreaPaddingLeft
- chartAreaPaddingRight
- chartAreaPaddingTop
- chartLegend
- dataSeries
- enableAutoFit
- events
- exportOptions
- height
- isInverted
- margin
- primaryHeader
- secondaryHeader
- seriesPalette
- seriesSettings
- area
- bar
- bubble
- donut
- line
- pie
- polararea
- polarbar
- polarline
- polarscatter
- polarspline
- polarsplinearea
- rangearea
- rangebar
- rangesplinearea
- scatter
- spline
- splinearea
- steparea
- stepline
- seriesType
- theme
- tooltipSettings
- width
- zoomMode
- Getting Started
- Events
- How-To
- Methods
- Styling
- Supported Browsers
- ASP.NET
- Barcode
- QR Code
- TagCloud
- TreeMap
- Grid
- ASP.NET
- ASP.NET Core
- ASP.NET MVC
- JAVA Apache Wicket
- JavaScript
- API
- Settings
- altRowTemplate
- altRows
- columnReorder
- columns
- dataSource
- detailCollapseCssClass
- detailCollapseText
- detailExpandCollapse
- detailExpandCssClass
- detailExpandText
- detailTemplate
- editing
- exportOptions
- filtering
- grouping
- height
- maxHeight
- noRecordsTemplate
- noRecordsText
- paging
- resizing
- rowHover
- rowTemplate
- scrolling
- selection
- showHeader
- sorting
- toolbar
- Events
- Properties
- Methods
- addRow
- cancelEditing
- clearSelection
- collapseRow
- dataItem
- deleteRow
- destroy
- editCell
- editRow
- expandRow
- exportCsv
- exportExcel
- exportPdf
- filter
- hideColumn
- insertRow
- isHidden
- isLocked
- lockColumn
- page
- pageSize
- refresh
- reorderColumn
- revertChanges
- saveChanges
- scrollTop
- select
- selectedRowIndices
- showColumn
- sort
- ungroup
- unlockColumn
- Settings
- Getting Started
- Autogenerated Editors
- Binding to Data
- Cancel User Iteraction
- Change Options Dynamically
- Columns
- Custom Editors
- Exporting
- Filtering
- Footer Total Aggregates
- Grouping
- Hierarchy
- Paging
- RTL
- Scrolling
- Selection
- Sorting
- Templates
- Themes
- Validation
- API
- Accordion
- AutoComplete
- Button
- Calendar
- CheckBox
- ColorPicker
- ComboBox
- ContextMenu
- DataSource
- DatePicker
- DateTimePicker
- Draggable
- DropDown
- Droppable
- Editor
- ListBox
- LoadingPanel
- MaskedTextBox
- Menu
- MonthYearPicker
- NumericTextBox
- Pager
- ProgressBar
- RadioButton
- Rating
- RecursiveDataSource
- Slider
- SplitButton
- Splitter
- Switch
- Tabs
- TextBox
- TimePicker
- Timeline
- Tooltip
- TreeView
- Upload
- Window
Similar to pie charts, donut charts are great for showing proportional data. It offers the same customization options as for pie charts, but with a custom sized inner cutout to turn your pies into donuts.

The chart from the image above is created with the following code:
<shield:ShieldChart ID="ShieldChart1" Width="580px" Height="400px" runat="server"
OnTakeDataSource="ShieldChart1_TakeDataSource"
CssClass="chart">
<PrimaryHeader Text="Browsers Popularity amongst Users"></PrimaryHeader>
<ExportOptions AllowExportToImage="false" AllowPrint="false" />
<TooltipSettings CustomPointText="{point.collectionAlias}:{point.y}"></TooltipSettings>
<DataSeries>
<shield:ChartDonutSeries EnableValueXSorting="false" DataFieldY="Value" DataFieldX="Browser" CollectionAlias="Usage">
<Settings EnablePointSelection="true"></Settings>
</shield:ChartDonutSeries>
</DataSeries>
</shield:ShieldChart>
protected void ShieldChart1_TakeDataSource(object sender, Shield.Web.UI.ChartTakeDataSourceEventArgs e)
{
List datasource = new List()
{
new Helper() { Browser = "Firefox", Value= 44.2 },
new Helper() { Browser = "IE7", Value= 26.6 },
new Helper() { Browser = "IE6", Value= 20 },
new Helper() { Browser = "Chrome", Value= 3.1 },
new Helper() { Browser = "Other", Value= 5.4 },
};
ShieldChart1.DataSource = datasource;
}
private class Helper
{
public string Browser { get; set; }
public double Value { get; set; }
}
- When the chart is bound to collection of objects the X values are got by the field which name is set into the
DataFieldXproperty of theChartDonutSeries. The Y values are got by the field which name is set into theDataFieldYproperty. - The name that is shown in the legend is chosen via the
CollectionAliasproperty of theChartDonutSeries. - By default all X values are sorted in order donut chart to be shown appropriately, however this behavior is controlled by the
EnableValueXSortingproperty of theChartDonutSeries. - The inner size of the donut series type is controlled by the
Settings.InnerSizeproperty. - The center of the donut series type chart can be changed by
Settings.CenterXandSettings.CenterYproperties which correspond to the x and y coordinates. DataStartandDataStepproperties control the start value of the x axis and explicit value for the interval between a data series member values.- Each part of the donut chart can be showed as sliced by setting
EnablePointSelectionandSlicedOffsetproperty. - All points from the
ChartDonutSeriesare represented withChartSeriesItemwhich belongs to theChartDonutSeries.Itemscollection.- The
ChartDonutSeries.Itemscan be added declarative without data binding. - The data binding and declarative approach can be mixed. However in order declarative items to be appended to the items created from the datasource the
ShieldChart.AppendDataBoundItemsproperty need to be set to"true".
- The
- All setting related to
ChartDonutSeriesare contained into theChartDonutSeries.Settingsobject.- The series color can be set via
Colorproperty. - If the
AddToLegendis set to false the series is not added into the legend. - The animation of the series can be controlled by
ChartDonutSeries.Settings.EnableAnimationandChartDonutSeries.Settings.AnimationDurationproperties. - Each point from the series can be selected if the
EnablePointSelectionproperty is set to true. - All selected points can be customized by
Settings.PointMark.ActiveSettings.PointSelectedStateobject properties. - From the
Settings.PointMark.ActiveSettings.PointHoveredStateobject properties you can change the appearance of each part when the user hovers it. - Each series has related tooltip which can be customized via the
Settings.Tooltipobject. - Each point from the series can have related text, which appearance is controlled by
Settings.DataPointTextproperty. You can changeBackgroundColor,BorderColor,Color,Padding, andTextAngleof the corresponding data point text.
- The series color can be set via
