ChartLabels Sample
--------------------------------------------------------------------------------
Shows custom chart layer that arranges chart labels to avoid overlapping.

Implementation(C1.WPF.C1Chart.Labels.dll)
-----------------------------------------
The chart layer ChartLabels contains collection of chart labels. There
are two types of chart labels:

- ChartLabel: attached by series and point indices.

  // adds label for 1st point of 1st series
  lbls.Children.Add( new ChartLabel() {
      Content = "1st point of 1st series",
      SeriesIndex = 0,
      PointIndex = 0
  });

- ChartLabelPoint: attached by data coordinates

  lbls.Children.Add(new ChartLabelPoint()
  {
    Content = "zero",
    DataPoint = new Point(0,0)
  });

Both chart labels are inherited from ContentControl and its appearance
can be easily changed.

Label layout is performed by separate class("label layout engine") that
should implement ILabelArranger interface. It's possible to create custom
layout engines. Several layout engines are included into the assembly:

- DecimationLabelArranger: just hides overlapping labels.

- OptimalLabelArranger: tries to find optimal label position avoiding overlapping.
  The label distance and angle from attached point can be changed during layout.
  Note: it is stochastic algorithm so the positions of labels may be different
  if you run it again under the same initial conditions.

  OptimalLabelArranger has following properties that control label layout:
    
	- MaxOffset specifies maximal label offset from the corresponding point.

	- Angles property enumerates available positions(angles) of label relatively
      to the point. E.g. the following code sets allowable positions: top-right, 
	  right, bottom-right.

	  arranger.Angles = new int[] { 45, 0, -45};

To turn on automatic label arrangement you need to set ChartLabels.LabelArranger
property:

 // turn on automatic label positioning without overlapping
 chartLabels.LabelArranger = new OptimalLabelArranger();
