Nevron Logo

Working with NOV Chart – Using Series Labels

Introduction

Having accurate and complete output labels across a representative data set is a fundamental requirement for any visual data representation. A good charting product must support an automatic data label layout. This white paper outlines the usage and benefits of the automatic layout functionality.

Implementation

All types of charts support automatic Data Label Layout. It is performed in two stages that can work independently or in combination. By default, both layout stages are disabled. They are activated on a per-chart basis, so all data point labels displayed in a given chart are subject to the automatic layout.

The first layout stage is called Initial Positioning. Initial Positioning aims to select a position for each label from a set of proposed locations situated around the origin point of the label. The control determines the location that causes minimum potential conflicts with other label locations.

It can be enabled with the following code:


m_Chart.LabelLayout.EnableInitialPositioning = true;


Initial Positioning 1

Fig. 1
Initial Positioning 2

Fig. 2

We can continue with the label adjustment.

Label Adjustment removes overlaps by shifting the overlapping labels apart from each other, using a force-directed layout algorithm. The functionality of label adjustment can be used regardless of whether initial positioning is enabled or not. Label adjustment cannot be disabled per series basis - it applies to all data labels in the chart.

chart.LabelLayout.EnableLabelAdjustment = true;
Label Adjustment

Fig. 1
Label Adjustment True

Fig. 2

And finally, the last touch is setting the data point safeguard. Data Point Safeguard is necessary functionality since it protects the data points from being too close to each other. It can be enabled or disabled on a per series basis with the following code:

// enable the data point safeguard
m_Area.LabelLayout.EnableDataPointSafeguard = true;

In addition, you can specify the distance around the labels by using the DataPointSafeguardSize property.

// set safeguard size
m_Area.LabelLayout.DataPointSafeguardSize = new NSize(2,2);

Conclusion

Automatic data label layout is critical in presenting large data sets that must be labeled accurately. The automatic layout functionality in NOV Chart for .NET aims to ensure maximum readability for chart elements by preventing data point labels from overlapping with each other and the data points themselves.

About Nevron Software

Founded in 1998, Nevron Software is a component vendor specialized in the development of premium presentation layer solutions for .NET based technologies. Today Nevron has established itself as the trusted partner worldwide for use in .NET LOB applications, SharePoint portals and Reporting solutions. Nevron technology is used by many Fortune 500 companies, large financial institutions, global IT consultancies, academic institutions, governments and non-profits.
For more information, visit: www.nevron.com.

Customer Quotes:

QUOTE Nevron has provided us with a high quality drawing and diagramming tool at a relatively low cost. It serves as an essential component to our KeyCSM product, allowing us to create a fresh and intuitive user experience. UNQUOTE

Philip Child, Services Manager
Keynetix Ltd