FlexChart for WPF
軸ラベルの重なり
FlexChart > FlexChart の操作 > FlexChart の要素 > FlexChart の軸ラベル > 軸ラベルの重なり

In case there are less number of data points and shorter label text, axis labels are rendered without any overlapping. However, axis labels may overlap due to its long text or large numbers of data points in chart.

To manage overlapped axis labels in FlexChart, use the following options.

Trim or Wrap Axis Labels

In case there are overlapping labels in the chart for any reason, you can manage the same using the OverlappingLabels property.

The OverlappingLabels property accepts the following values in the OverlappingLabels enumeration:

Property Description
Auto
Hides overlapping labels.
Show
Shows all labels including the overlapping ones.
Trim
Trim label, if it's larger than the available width.
WordWrap
Wrap label, if it's larger than the available width.

Here is the code snippet:

flexChart.AxisX.OverlappingLabels = C1.Chart.OverlappingLabels.Auto;
flexChart.AxisY.OverlappingLabels = C1.Chart.OverlappingLabels.Show;

Staggered Axis Lines

Another way to handle overlapping of axis labels is to stagger them for better visibility. Staggered axis labels can generated by using StaggeredLines property. This property accepts an integer value and the default value is set to 1.

// StaggeredLines プロパティを設定します
flexChart1.AxisX.StaggeredLines = 2;