Skip to main content

Chart controls

Charts provide a library of data visualization controls and documented composition patterns for building dashboards, analytics, financial tools, scientific reports, and more. Common charting features, such as tooltips, legends, and interactivity, are supported out of the box and integrate with Avalonia's theming system.

info

Charts are available with Avalonia Pro.

Installation and licensing

Install the Avalonia.Controls.Charts package in your Avalonia project. All chart types are in this package and use the https://avaloniaui.net/controls/charts XML namespace.

<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:charts="https://avaloniaui.net/controls/charts">
<StackPanel Spacing="16">
<charts:CartesianChart Title="Revenue" Height="300" />
<charts:SankeyChart Title="User flow" Height="300" />
</StackPanel>
</UserControl>

Add your license key to the executable project:

<ItemGroup>
<AvaloniaUILicenseKey Include="YOUR_LICENSE_KEY" />
</ItemGroup>

Use the single Charts package and XML namespace for all chart types.

Example use cases

Charts are suited for:

  • Business dashboards: KPI cards, trend lines, bar comparisons, and funnel views for operational data.
  • Financial applications: Candlestick, OHLC, Heikin-Ashi, and other price-action charts for trading and market analysis.
  • Analytics and reporting: Heatmaps, scatter plots, histograms, and table charts for exploring and presenting datasets.
  • Scientific and statistical views: Box plots, violin plots, error bars, and mosaic charts for distributional analysis.
  • Process and hierarchy visualization: Sankey diagrams, organization charts, treemaps, and network graphs for relational data.
  • Geographic data: Choropleth, bubble map, and heatmap overlays for regional comparisons.
  • Progress and status indicators: Circular gauges, linear gauges, and liquid-fill gauges for real-time monitoring.

Data sources

Cartesian series can bind to object collections through ItemsSource, CategoryPath, and ValuePath. For simple numeric series, ItemsSource can also be a direct IList<double>, IList<int>, IList<float>, IList<decimal>, or IList<Point>. Direct numeric lists use the item index as the category value.

Series skip non-finite numeric values such as NaN and infinity when computing bounds and rendering continuous data.

Cartesian series use EmptyPointMode to control how null or non-finite points are handled in the rendered series. Supported values are Zero, Gap, Average, and Interpolate. The default is Zero.

Common chart properties

Most chart controls share these properties through ChartBase.

PropertyDescriptionDefault
TitleText displayed above the chart.null
PaletteOptional chart palette used to generate series or item colors.null
LabelForegroundBrush used for chart-level labels when a more specific label brush is not set.null
PlotAreaContentOptional control arranged over the effective plot area.null

Some chart types also expose additional chart-level styling surfaces when the visual surface exists on that chart.

PropertyDescriptionDefault
AxisBrushBrush used for axis lines, ticks, radial axes, or equivalent scale guides.null
GridLineBrushBrush used for chart-level grid lines.null
PlotAreaBackgroundBrush used for the data plot rectangle only, not the whole chart background.null

Common series properties

Most series share these properties through ChartSeries. Individual chart pages list additional properties for their specific series type.

PropertyDescriptionDefault
TitleSeries name shown in legends and generated tooltip content.null
ItemsSourceData collection used by the series.null
ValuePathProperty path used for the primary numeric value.null
FillBrush used for filled series surfaces or item interiors.null
StrokeBrush used for series outlines, lines, or item borders.null
StrokeThicknessBase stroke thickness. Some default themes set a type-specific value.1.0
PointBrushPathOptional property path that resolves an IBrush per data item. Supported series use it for individual points, markers, segments, or slices.null

Animation

Charts and series share an animation pipeline.

PropertyDescriptionDefault
IsAnimationEnabledEnables chart entry animations.true
AnimationDurationDuration of the chart entry animation.00:00:01
EasingEasing function applied to chart animation progress.CubicEaseOut
AnimationDelaySeries-level delay before the series animation starts.00:00:00
AnimationProgressSeries-level animation progress from 0.0 to 1.0.1.0

Extensibility

Custom Cartesian series derive from CartesianSeries and implement RenderSeries(in SeriesRenderContext context). The render context provides the chart instance, plot area, category map, viewport bounds, and resolved brushes needed by the series drawing logic. Series can override CreateLegendItem to customize their legend marker and can expose data through GetDataPoints() or related range and polar data-point structs for bounds, tooltips, and interactions. When upgrading an existing custom Cartesian series, move any older TryRenderSelf(...) rendering logic into RenderSeries(in SeriesRenderContext context).

Financial overlays can render in FinancialChart by implementing IFinancialChartOverlaySeries. See Financial chart for overlay-specific behavior.

Chart categories

Analytics and KPI charts

Charts for summarizing metrics, identifying patterns, and presenting findings.

ChartDescription
KPI cardDisplays a key metric alongside a trend indicator and a sparkline.
Heatmap chartShows a matrix of values as a color-coded grid.
Funnel chartVisualizes a sequential process where volume decreases at each stage.
Waffle chartRepresents a percentage as filled cells in a grid.
Word cloud chartSizes words by frequency to show prominence in a dataset.
Bullet chartCompares a primary value to a target and qualitative ranges in a compact layout.
Calendar heatmap chartShows daily activity intensity in a week-by-week calendar grid.
Matrix chartDisplays relationships between two sets of categories in a grid.
Table chartPresents data in rows and columns with optional conditional formatting.
Bump chartTracks rank changes over time using crossed lines.
Slope chartCompares values at two points in time using angled lines.
Pyramid chartStacks segments vertically to show hierarchical or sequential proportions.
Theme river chartBuilds a theme-river-style layout with stacked area series and a centered spacer offset.
Pictorial bar chartReplaces standard bars with icons or shapes sized by value.

Bubble and packed charts

Charts that encode magnitude with marker size and often omit traditional axes or grids.

ChartDescription
Bubble chartPlots X and Y values and uses bubble size for a third measure.
Bubble cloud chartArranges sized bubbles in an organic, clustered layout without axes.
Packed bubble chartPacks category bubbles tightly into a compact space for part-to-whole comparison.

Cartesian charts

Charts that plot data on horizontal and vertical axes. Use these for trends, comparisons, distributions, and correlations.

ChartDescription
Bar chartCompares discrete quantities across categories using rectangular bars.
Line chartConnects data points with straight segments to show trends over time.
Area chartFills the area below a line to emphasize cumulative totals or volume.
Combo chartCombines multiple Cartesian series types on one plot, with optional secondary Y-axis support.
Scatter chartPlots individual data points to reveal correlations between two variables.
Spline chartConnects data points with curved lines to show gradual changes in time-dependent data.
Step line chartConnects points with horizontal and vertical steps for discrete state changes.
Stacked bar chartShows part-to-whole relationships across categories using stacked bars.
Stacked area chartShows cumulative totals over time using stacked filled areas.
Range area chartDisplays high-low ranges as a filled band between two values.
Waterfall chartShows how an initial value changes through a series of positive and negative contributions.
Histogram chartGroups continuous values into bins to show frequency distribution.
Pareto chartCombines bars and a cumulative line to identify significant factors.

Circular charts

Charts that represent data as segments of a circle.

ChartDescription
Pie chartDivides a circle into proportional slices to show part-to-whole relationships.
Donut chartA pie chart with a hollow center, often used to display a total in the middle.
Semi-donut chartA half-circle donut for compact part-to-whole views.

Comparison charts

Charts for before-and-after analysis, back-to-back comparison, and proportional allocation.

ChartDescription
Diverging bar chartExtends bars left and right from a centered baseline.
Dumbbell chartConnects two values per category with a line and markers.
Mekko chartCombines variable-width columns with stacked segments to show size and composition.
Mirror bar chartPlaces two bar series back to back around a center line.
Parliament chartDisplays seat distribution in a hemicycle layout.
Population pyramid chartShows two opposing population distributions by ordered bands.
Tornado chartDraws bidirectional horizontal bars for sensitivity or ranked comparisons.
Venn diagram chartVisualizes set overlap and intersection values.

Engineering and scientific charts

Charts for technical surfaces, multivariate scientific views, and specialized coordinate systems.

ChartDescription
Carpet plot chartMaps two independent variables and one dependent variable onto a skewed grid.
Hexbin chartAggregates dense 2D point clouds into hexagonal density bins.
Smith chartVisualizes complex impedance or admittance data on a normalized radio frequency grid.
Ternary chartPlots three-part compositions that sum to a constant.
Wind rose chartShows directional frequency distributions as stacked polar sectors.

Financial charts

Specialized charts for price and market data analysis.

ChartDescription
Financial chartHosts financial series such as candlestick and OHLC on shared price axes.
Candlestick chartShows open, high, low, and close prices per period as candle shapes.
OHLC chartDisplays OHLC price data as vertical bars with tick marks.
Heikin-Ashi chartA smoothed candlestick variant that filters out short-term noise.
Hilo chartPlots only the high and low values per period as a vertical line.
Kagi chartFilters small price moves to show significant direction changes.
Renko chartPlots price movement as fixed-size bricks, ignoring time.
Point and figure chartUses columns of X and O symbols to track supply and demand.

Gauges

Visual displays of a single value relative to a range. Common in monitoring dashboards and real-time status panels.

ChartDescription
Circular gaugeA dial-style gauge with a needle or arc indicator.
Gauge chartDisplays a single value on a semi-circular dial with optional needle.
Linear gaugeA horizontal or vertical track with a pointer or fill.
Gradient ring chartDraws multiple concentric progress rings against a shared maximum.
Liquid fill gaugeRepresents a percentage as a rising liquid level inside a shape.
Progress donutA circular arc that fills proportionally to indicate progress.

Hierarchy and flow charts

Charts for visualizing relationships, flows, and tree structures.

ChartDescription
Flow chartVisualizes workflows, decision trees, and system maps using nodes and directed edges.
Sankey chartShows flow quantities between nodes using proportional bands.
Alluvial chartTracks how items transition between categories across stages.
Treemap chartRepresents hierarchical data as nested rectangles sized by value.
Sunburst chartDisplays hierarchy as concentric rings radiating from a center.
Circle packing chartNests circles to represent hierarchical proportions.
Flame graphShows hierarchical stacks of cost or duration data from bottom to top.
Icicle chartShows hierarchy as stacked rectangular bands from top to bottom.
Dendrogram chartA tree diagram used in clustering and classification contexts.
Indented tree chartDisplays hierarchy as an indented list with expandable nodes.
Radial tree chartArranges a tree hierarchy in a circular layout.
Organization chartVisualizes reporting structures and team hierarchies.
Mind map chartBuilds an ideation layout on top of FlowChart with diverging nodes and links.
Network chartPlots nodes and edges to show relationships without a fixed hierarchy.
Force-directed graphArranges nodes using simulated physical forces to reveal clusters.
Chord diagramShows pairwise relationships between entities as arcs around a circle.
Arc diagramDisplays connections between nodes laid out on a straight axis.
Process flow chartUses FlowChart to represent sequential or branching workflows.

Maps

Charts that overlay data onto geographic or custom spatial layouts.

ChartDescription
Choropleth mapColors map regions by a numeric value to show geographic distribution.
Bubble mapPlaces sized circles on a map to represent values at specific locations.
HeatmapApplies a color gradient over a map to show intensity or density.
Shape mapRenders custom regions as a data-driven map.
Seat mapDisplays venue or floor-plan layouts with interactive seat selection.

Radial charts

Charts that use a circular coordinate system rather than Cartesian axes.

ChartDescription
Polar chartPlots arbitrary angle and radius values in a polar coordinate system.
Radar chartPlots multivariate data as a polygon on a circular grid of axes.
Polar area chartDivides a circle into equal-angle segments sized by value.
Nightingale Rose chartA polar area chart where radius, not area, encodes the value.
Radial bar chartDisplays categories as arcs of varying length around a center point.
Radial line chartA line chart projected onto a circular axis.

Scheduling and timeline charts

Charts for time-based planning, project management, and sequential data.

ChartDescription
Gantt chartShows tasks and their durations across a horizontal time axis.
Timeline chartDisplays events in chronological order along a linear axis.
Swimlane chartOrganizes tasks into parallel rows to show ownership or phase.
Spiral timeline chartArranges time-based data along a spiral for cyclical patterns.
Sparkline chartAn inline miniature chart for showing trends within a small space.

Statistical charts

Charts for distributional and comparative statistical analysis.

ChartDescription
Beeswarm plot chartDisplays individual observations as non-overlapping dots within each category.
Box plot chartSummarizes a distribution using medians, quartiles, and outliers.
Contour plot chartDisplays 2D scalar fields as contour lines and optional filled bands.
Density plot chartUses kernel density estimation to render a smooth distribution curve.
Error bar chartAdds error or uncertainty indicators to data points.
Mosaic chartVisualizes proportions across two categorical variables as nested rectangles.
Parallel coordinates chartCompares multivariate records as lines across parallel axes.
Ridgeline chartStacks multiple overlapping distributions for shape comparison.
Strip plot chartDisplays individual observations per category with jitter and optional mean lines.
Violin plot chartCombines a box plot with a kernel density shape to show distribution.

Shared elements

Most chart types share the following configurable elements:

ElementDescription
LegendIdentifies each data series by name and color.
TooltipShows data values on hover or tap.
CrosshairsDraws intersecting lines that follow the pointer across the chart.
Data labelsRenders the value of each data point directly on the chart.
Chart exportSaves a chart view to a PNG or JPEG file, PNG stream, or save dialog.
MarkersAdds point symbols at each data value.
TrendlineOverlays a regression or moving-average line on a series.
AnnotationsPlaces labels, lines, or shapes at specific data coordinates.
Axis customizationControls tick marks, labels, gridlines, and scale.
InteractionsConfigures zoom, pan, selection, hover highlighting, and trackball behavior.

See also