IntroductionHaving 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.
|
ImplementationAll 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;
Fig. 1
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;
Fig. 1
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 safeguardm_Area.LabelLayout.EnableDataPointSafeguard = true; In addition, you can specify the distance around the labels by using the DataPointSafeguardSize property. // set safeguard sizem_Area.LabelLayout.DataPointSafeguardSize = new NSize(2,2); |
ConclusionAutomatic 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 SoftwareFounded 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. |
We use cookies to allow us to automate the access and the data entry functions of our website and to correlate online ordering information for purchases you may make while at the website (if any), tailor our website to your preferences or interests, or customize promotions or marketing. For full details read our cookie policy.