Skip to main content
A newer version of this page is available. .

Best Practices: Display Large Data

  • 5 minutes to read

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.

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 (according to the measurement unit value), and uses an aggregation function to automatically aggregate data for each interval:

Non-aggregated data Data aggregated by month
Non-Aggregated Data Aggregated Data

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.

  • Enclose the code that adds points in the ChartControl.BeginInit and ChartControl.EndInit methods’ calls to avoid frequent chart updates:

    for(int i = 0; i < PointsCount; i++) {
        chartControl.Diagram.Series[0].Points.Add(new SeriesPoint(i, i));
  • Add points to the series in a single operation instead of adding each point separately:

    SeriesPoint[] points = new SeriesPoint[PointsCount];
    for (int i = 0; i < PointsCount; i++) {
        points[i] = new SeriesPoint(i, i);
  • Series with added points are rendered faster than series bound to a data source or automatically generated series.

  • Use the Series.DataSourceSorted property to notify the chart that the series’s data source is sorted to prevent the chart’s internal sorting procedures.

Automatic Resampling

An internal data resampling algorithm allows the chart to avoid unnecessary operations when rendering series. The chart renders the minimum set of points required to display the correct series shape and form. The algorithm discards all points that have no effect on the output (for example, overlapped points). Every time the zoom level or visible data range changes, the chart re-calculates the minimum point set.

The resampling algorithm is in effect under the following conditions:

The resampled data algorithm and aggregated data display technique optimize RAM usage, but aggregate calculations require additional time and the resulting series shape can be different from the original.

Note: To prevent the Chart Control from resampling a specific series, set the series’s AllowResample property to false.

Automatic Calculations

Automatic range, scale type, and layout calculations require additional resources.

  • Use the Range.SetMinMaxValues method to define an AxisBase.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 ChartControl.AutoLayout property to false.

  • Define a scale type for series points’ arguments if possible. For this, set the Series.ArgumentScaleType property to the ScaleType.Numerical, ScaleType.DateTime or ScaleType.Qualitative value depending on your data type. A chart should perform additional calculations to determine the actual scale type when ScaleType.Auto 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.

Visual Elements

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

Interactivity Optimization

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

Changeable Data

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

For this reason, use the IBindingList and ObservableCollection<T> objects to provide data to the chart control when it should display data that updates frequently.