[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Collapse]Charts Suite
   [Collapse]Chart Control
    [Expand]Getting Started
    [Expand]Fundamentals
    [Collapse]Providing Data
      Create a Series Manually
      Add Points to a Series Manually
      Bind a Series to a Data Source
      Define a Template for Automatic Series
      Provide Data for the Drill Mode
      Best Practices: Display Large Data
      Series Scale Types
      Data Aggregation
      Calculate Summaries
      Data Filtering
      Colorizers
      Work Time and Workday Configuration
      Top N and Others
      Histogram
    [Expand]Chart Elements
    [Expand]Appearance Customization
    [Expand]End-User Features
    [Expand]Design-Time Features
    [Expand]Examples
    [Expand]Additional Resources
   [Expand]Chart3D Control
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Best Practices: Display Large Data

A chart's performance directly relates to how many points and elements it displays: fewer elements result in higher performance. This topic explains how to reduce the number of data points and enhance the chart's performance.

Expanded Data Aggregation

Data Aggregation groups raw data points into points with a larger argument measurement unit. When the Aggregation is enabled, the chart splits the x-axis into intervals (that the measurement unit value defines), and uses an aggregation function to automatically aggregate data for each interval:

Non-aggregated data Data aggregated by month

Expanded Loading Data

The following approaches reduce the time the chart control takes to load data:

  • Store all data points in as few series as possible. The Chart control is optimized to render a small number of series with many points, rather than a large number of series with a few points. For example, a single series with a million points is processed faster than 10 series with 100000 points each.

  • You can enclose the code that adds points in the ChartControlBase.BeginInit and ChartControlBase.EndInit methods' calls to avoid frequent chart updates:

  • The best way to add points to the series is to use a single operation instead of adding each point separately:

Expanded Automatic Calculations

The range, scale type, and layout's automatic calculations require additional resources.

  • Use the Range.SetMinMaxValues method to define an Axis.WholeRange's limits for x- and y-axes if the points' argument and value range are known. Refer to the Whole and Visual Ranges document for more information on axis ranges.

  • Set the ChartControlBase.AutoLayout property to false.

  • Define a scale type for series points' arguments if possible. For this, set the Series.ArgumentScaleType property to the ScaleType, ScaleType or ScaleType value depending on your data type. A chart should perform additional calculations to determine the actual scale type when ScaleType is used. Note that a chart achieves the best possible performance when it has the Numerical arguments' axis scale type. However, the DateTime scale type does not suffer from significant performance degradation. In comparison with them, the Qualitative scale type requires more resources to process data values.

Expanded Visual Elements

Follow the steps below to decrease the time needed to render a chart's visual elements:

Expanded Interactivity Optimization

The Selection and tooltips features require additional CPU and RAM resources and may decrease performance.

Expanded Changeable Data

This section contains tips to enhance performance when a chart shows a dataset that changes frequently.

  • Remove an existing point and add a new one instead to update the chart's data. The existing SeriesPoint (see SeriesPoint) argument/value change results in unnecessary calculations. For example, the SeriesPoint.Value property's change entails the chart content's update.

  • The Chart Control handles the following events to avoid to reload all data when the chart is bound to a dataset that updates frequently:

    • System.ComponentModel.IBindingList.ListChanged;

    • System.Collections.Specialized.INotifyCollectionChanged.CollectionChanged.

For this reason, use the IBindingList (see System.ComponentModel.IBindingList) and ObservableCollection<T> (see System.Collections.ObjectModel.ObservableCollection<T>) objects to provide data to the chart control when it should display data that updates frequently.

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