[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Collapse]Chart Control
   [Expand]Product Information
   [Expand]Getting Started
    [Collapse]Creating Charts
     [Expand]2D Chart Types
     [Expand]3D Chart Types
     [Expand]Providing Data
     [Collapse]Data Representation
       Filtering Data
       Sorting Data
       Calculating Summaries
       Using The Top-N Feature
       Data Aggregation
       Workday and Holiday Exclusion
       Empty Points Representation
     [Expand]Appearance Customization
    [Expand]Chart Elements
    [Expand]End-User Interaction
     Supported Browsers
     Adding a Web Chart
     Handling Client-side Scripts
     Medium Trust Support
     Web Farm and Web Gardens Support
   [Expand]Design-Time Features
   [Expand]Visual Elements
  [Expand]Pivot Grid
  [Expand]Rich Text Editor
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Using The Top-N Feature

This document describes how to aggregate a number of series points into a single point.

The topic consists of the following sections.

Expanded Top-N Feature Overview

ASP.NET Charts support the Top-N feature, which allows you to get rid of series points with negligibly small values by either aggregating them into a single cumulative point, or by excluding them from the chart. Note that this does not affect the series points collection, and only has an effect on the chart's visual representation.

In general, this cumulative point (when made visible) behaves like an ordinary point (e.g., it can be exploded and displayed in the legend, where it can be accompanied by custom text).


The Top-N feature is only in effect for a series whose data points contain only one value, because this value is used to determine which points to show. Thus, the Top-N feature is not available for series whose view type implies more than one value (e.g., Stock or Bubble).

If a series contains data points with negative values, their absolute values are taken into account when calculating which points should be visible within the chart.

Expanded Using the Top-N Feature

To enable the Top-N feature within the SeriesBase.TopNOptions property, set the TopNOptions.Enabled property to true. Then choose the criteria upon which points are gathered in the cumulative point from the TopNOptions.Mode property. The available modes are described below.

  • Count
    When this mode is specified, only the first N points within the collection remain visible, while others are aggregated in the cumulative point. The number of points not to be included is specified from the TopNOptions.Count property.

    Count = 5

    Note that with Bar, Line and Area Stacked Charts, values are displayed with stacking on shared series arguments, so the Top N points for multiple series (calculated independently for each series) can include points with the same arguments.

    The table below shows how this works for a Stacked Bar Chart with each series TopNOptions.Count property set to 3. Excluding the "Others" cumulative point, 6 values (3 per series) are shown for 5 arguments.

    The Top-N feature is not applied.

    The Top-N feature is applied for both series (Count=3).

  • ThresholdValue
    When this mode is specified, you should define the value threshold for points to overcome so that they are not included in the cumulative point. This is done using the TopNOptions.ThresholdValue property.

    ThresholdValue = 5

  • ThresholdPercent
    Similar to the previous mode, this parameter specifies the percentage threshold from the TopNOptions.ThresholdPercent property.

    ThresholdPercent = 7

To choose whether or not the cumulative point should be visible, use the TopNOptions.ShowOthers property. Note that if values are represented as percentages (either in series point labels or in the legend), the overall percentage ignores the values of the hidden points. The following image illustrates this.

Note that when this property is set to true, the cumulative point is displayed in the legend, and if arguments are displayed in the legend, its default argument is Others. You can specify a custom argument from the TopNOptions.OthersArgument property. Note that this property setting also affects this point's label.

To explode the cumulative point in a Pie or Doughnut chart, set the PieSeriesViewBase.ExplodeMode property to Others.

Expanded See Also

Is this topic helpful?​​​​​​​