Dundas Chart for ASP.NET
AlignDataPointsByAxisLabel(PointsSortOrder) Method
See Also  Send comments on this topic.
Dundas.Charting.WebControl Namespace > Chart Class > AlignDataPointsByAxisLabel Method : AlignDataPointsByAxisLabel(PointsSortOrder) Method


sortingOrder
Determines if ascending or descending sort order used on axis labels, which in turn determines the order by which points that previously occupied same axis space are displayed.
Determines if ascending or descending sort order used on axis labels, which in turn determines the order by which points that previously occupied same axis space are displayed.
Points sorting order by axis labels.

Aligns data points from different series along the X axis using their axis labels. All series in the chart are aligned, using the specified sort order.


Aligns data points using their axis labels.

Syntax

Visual Basic (Declaration)  
Public Overloads Sub AlignDataPointsByAxisLabel( _
   ByVal sortingOrder As PointsSortOrder _
) 
Visual Basic (Usage) Copy Code
Dim instance As Chart
Dim sortingOrder As PointsSortOrder
 
instance.AlignDataPointsByAxisLabel(sortingOrder)
C#  
public void AlignDataPointsByAxisLabel( 
   PointsSortOrder sortingOrder
)

Parameters

sortingOrder
Determines if ascending or descending sort order used on axis labels, which in turn determines the order by which points that previously occupied same axis space are displayed.
Determines if ascending or descending sort order used on axis labels, which in turn determines the order by which points that previously occupied same axis space are displayed.
Points sorting order by axis labels.

Remarks

This method is used to align data points from different series along the X axis using their axis labels, and is applicable when:

  • multiple series are being displayed and are indexed (i.e. all points have an XValue of 0, or Series.XValueIndexed is true).
  • all data points have non-empty axis labels, which are unique to their series (otherwise an exception will be thrown).

This situation is very common when data-binding results in the creation of multiple series, and string values are being used for X axis values.

Two issues arise when multiple, indexed series are plotted, and the X-values are being set using string values:

  1. We cannot guarantee that data points from different series with the same string X-values will be plotted at the same index along the X axis;
  2. Only the axis label for the first series' point will be displayed, even though points from other series with the same index have axis labels too.

For example, in Figure 1 below two series are plotted, each with two data points. The first series' points have the following labels: "Point 1 - Series 1" and "Point 2". The second series has these axis labels: "Point 1 - Series 2" and "Point 2". In the left-hand image the first points in the two series are plotted together, since they have an index of 0.

However, if we call AlignDataPointsByAxisLabel the first points in the two series are separated and plotted at different locations along the X axis since they have different axis labels (see Figure 1 below). In effect calling this method allows for the X-value, which is a string, to determine where data points are plotted. The second points are not separated since they both have an axis label of "Point 2".


Figure 1: Data points are aligned using their axis values.

This definition aligns the data points for all chart series. To only apply AlignDataPointsByAxisLabel to a specific chart series use a definition that takes a series parameter.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

Copyright © 2001 - 2009 Dundas Data Visualization, Inc. and others.