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 We use Nevron Diagram for .NET in our client server software that allows Enel’s operational compartments to plan the electrical net; the software enable electrical engineers to find less expensive, but still efficient, solutions for the electrical net. The software works in disconnected mode, as a smart client, and allows the personnel to simulate various configuration of the electrical net; using the client program it is possible to add, remove or substitute pieces of the MT electrical net representation as well as change connection points.

The simulator, then, allows to emulate every single point of failure of the net and for each of them reconfigures the net for the best off-line time (breakers take several maneuvers and counter-maneuvers to operate correctly). At the end of the simulation an animation is recorded for the best solution found (time/price). The animation is then displayed , using Nevron Graph controls, allowing the electrical engineer to check the correctness of the result and the various “moves” that the simulator toke to get to the best solution. When the personnel is then satisfied with the solution it uses the client application to update the remote DB with a request to acquire the needed resources to build this new configuration on the real net.
UNQUOTE

Gian Piero Anselmi
NIT - New Information Technology S.r.l.