WinForms, ASP.NET and WPF Charts: More on Adaptive Chart Layout (Coming soon in v14.2)

17 November 2014

I thought I would share a little more detail on the upcoming adaptive chart layout feature coming in our 14.2 release. Previously resizing a chart would produce something like this:

Standard Chart Without Adaptive Layout

While the chart still looks good, the data bars (the essential part of the chart) are being overshadowed by other non-essential elements. The adaptive chart layout feature is designed to help this particular problem.

Enabling Adaptive Layouts

The adaptive chart layout feature is enabled by default and you don't need to write any line of code to implement this functionality in your application. Just make sure the ChartControl.AutoLayout property is set to true.

How does it work?

Inside any chart there are a number of elements that have a Visibility (WinForms, ASP.NET) or Visible (WPF) property (e.g., a legend, an axis, an axis title, a chart title). These elements are systematically hidden as the chart becomes smaller. In addition to those elements, if a BarSeriesLabel.Position property is set to BarSeriesLabelPosition.Auto  we automatically modify the position with respect to the chart size. Take a look:

Chart With Adaptive Layout

In case of pie and donut charts, the Dimension property for SimpleDiagram and SimpleDiagram3D is calculated automatically during resizing. For instance, when you decrease chart size, all pies (donuts) are placed in one line horizontally (by row) or vertically (by column) in the diagram to occupy all of the available free space.

Pie Chart With Adaptive Layout

To disable the adaptive layout feature, set the ChartControl.AutoLayout property to false.

This subtle, but important, feature is another step towards truly intelligent data visualizations that not only look great, but adapt to your customers’ constraints.

4 comment(s)
Steve Sharkey

Looks good... However...

No scaling of font?

Also I assume you decide the relative priority of items - could this not be a developer configurable thing so a legend might persist after the titles have gone?

17 November, 2014
Alan (DevExpress)

Hi Steve,

Thank you for your comments! We'll think about the priority of items and font scaling and try to implement this functionality in one of future updates.

18 November, 2014
Julio Delgado_1

Great !!!, So we will have autoscaling for ASP.NET too

18 November, 2014
Eric Vernon

Can this be done with the PieSeries2D Series Label?

5 December, 2014

Please login or register to post comments.