-
Data Grid
- Overview
-
Data Binding
-
Paging and Scrolling
-
Editing
-
Grouping
-
Filtering and Sorting
- Focused Row
-
Row Drag & Drop
-
Selection
-
Columns
- State Persistence
-
Appearance
-
Templates
-
Data Summaries
-
Master-Detail
-
Export to PDF
-
Export to Excel
-
Adaptability
- Keyboard Navigation
-
Pivot Grid
- Overview
-
Data Binding
-
Field Chooser
-
Features
-
Export to Excel
-
Tree List
- Overview
-
Data Binding
- Sorting
- Paging
-
Editing
- Node Drag & Drop
- Focused Row
-
Selection
-
Filtering
-
Column Customization
- State Persistence
- Adaptability
- Keyboard Navigation
-
Scheduler
- Overview
-
Data Binding
-
Views
-
Features
- Virtual Scrolling
-
Grouping
-
Customization
- Adaptability
-
Html Editor
-
Chat
-
Diagram
- Overview
-
Data Binding
-
Featured Shapes
-
Custom Shapes
-
Document Capabilities
-
User Interaction
- UI Customization
- Adaptability
-
Charts
- Overview
-
Data Binding
-
Area Charts
-
Bar Charts
- Bullet Charts
-
Doughnut Charts
-
Financial Charts
-
Line Charts
-
Pie Charts
-
Point Charts
-
Polar and Radar Charts
-
Range Charts
-
Sparkline Charts
-
Tree Map
-
Funnel and Pyramid Charts
- Sankey Chart
-
Combinations
-
More Features
-
Export
-
Selection
-
Tooltips
-
Zooming
-
-
Gantt
- Overview
-
Data
-
UI Customization
- Strip Lines
- Export to PDF
- Sorting
-
Filtering
-
Gauges
- Overview
-
Data Binding
-
Bar Gauge
-
Circular Gauge
-
Linear Gauge
-
Navigation
- Overview
- Accordion
-
Menu
- Multi View
-
Drawer
-
Tab Panel
-
Tabs
-
Toolbar
- Pagination
-
Tree View
- Right-to-Left Support
-
Layout
-
Tile View
- Splitter
-
Gallery
- Scroll View
- Resizable
-
-
Editors
- Overview
- Autocomplete
-
Calendar
- Check Box
- Color Box
- Date Box
-
Date Range Box
-
Drop Down Box
-
Number Box
-
Select Box
- Switch
-
Tag Box
- Text Area
- Text Box
- Validation
- Custom Text Editor Buttons
- Right-to-Left Support
- Editor Appearance Variants
-
Forms and Multi-Purpose
- Overview
- Button Group
- Field Set
-
Filter Builder
-
Form
- Radio Group
-
Range Selector
- Numeric Scale (Lightweight)
- Numeric Scale
- Date-Time Scale (Lightweight)
- Date-Time Scale
- Logarithmic Scale
- Discrete scale
- Custom Formatting
- Use Range Selection for Calculation
- Use Range Selection for Filtering
- Image on Background
- Chart on Background
- Customized Chart on Background
- Chart on Background with Series Template
- Range Slider
- Slider
-
Sortable
-
File Management
-
File Manager
- Overview
-
File System Types
-
Customization
-
File Uploader
-
-
Actions and Lists
-
Maps
- Overview
-
Map
-
Vector Map
-
Dialogs and Notifications
-
Localization
Charts - Pie with Annotations
Annotations are containers for images, text blocks, and custom content. Annotations can help deliver a more refined user-experience and can improve analysis and readability (by displaying additional information for visualized data).
To create annotations, populate the PieChart's annotations array. Each object in the array configures an individual annotation. To specify settings for all annotations, use the commonAnnotationSettings object. Individual settings take precedence over common settings.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
@model IEnumerable<DevExtreme.MVC.Demos.Models.MedalAnnotationInfo>
@(Html.DevExtreme().PieChart()
.ID("pie")
.Palette(VizPalette.Vintage)
.Title("Ice Hockey World Championship Gold Medal Winners")
.CommonAnnotationSettings(ca => ca
.Type(AnnotationType.Image)
.PaddingLeftRight(0)
.PaddingTopBottom(0)
.TooltipTemplate(@<text>
<div class='medal-tooltip'>
<div class='country-name'>
<%- data.Country %><% if(data.OldCountryName) { %>
<br /><%- data.OldCountryName %>
<% } %>
</div>
<div class='gold'>
<span class='caption'>Gold</span>: <%- data.Gold %>
</div>
<div class='silver'>
<span class='caption'>Silver</span>: <%- data.Silver %>
</div>
<div class='bronze'>
<span class='caption'>Bronze</span>: <%- data.Bronze %>
</div>
</div>
</text>)
.Image(i => i
.Height(60)
.Width(90)
)
)
.Annotations(a => {
foreach(var annotation in Model) {
a.Add()
.Argument(annotation.Country)
.Image(annotation.Image)
.Data(annotation.Data)
.Location(annotation.Location)
.OffsetX(new JS(annotation.OffsetX.HasValue
? annotation.OffsetX.Value.ToString()
: JS.Undefined.ToString()))
.OffsetY(new JS(annotation.OffsetY.HasValue
? annotation.OffsetY.Value.ToString()
: JS.Undefined.ToString()))
.Color(annotation.Color)
.Border(b => b.Color(annotation.BorderColor))
.Shadow(s => s.Opacity(
new JS(annotation.ShadowOpacity.HasValue
? annotation.ShadowOpacity.Value.ToString()
: JS.Undefined.ToString())));
}
})
.Series(s =>
s.Add()
.ArgumentField("Country")
.ValueField("Gold")
.Label(l => l
.Visible(true)
.Position(PieChartLabelPosition.Inside)
.RadialOffset(83)
.BackgroundColor("transparent")
.Font(f => f
.Size(16)
.Weight(600)
)
)
)
.Tooltip(t => t
.PaddingLeftRight(12)
.PaddingTopBottom(10)
)
.Legend(l => l.Visible(false))
.DataSource(Model.Select(d => d.Data))
)
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
You can set each annotation type property to "text", "image", or "custom". In this demo, the type used for all annotations is "image".
Annotations can deliver more information if you add tooltips. A tooltip appears when users hover the mouse pointer over an annotation. This demo illustrates how you can implement a tooltip with custom content via the tooltipTemplate property.
For more information on annotation settings, refer to the annotations[] help topic.