Plot Area Size
The PlotArea size can be specified using the ColumnDefinitions and RowDefinitions collections in the class PlotAreaCollection. The approach is similar to working with the standard grid control. The first collection contains column attributes(widths). The second collection is for the row(height). By default, the plot areas have the same width and the same height.
The following example show how to programatically specify the size of the plot area:
// widths
// the width of first plot area is default(fill available space)
chart.View.PlotAreas.ColumnDefinitions.Add(new PlotAreaColumnDefinition());
// the width of second plot area is constant 100 px
chart.View.PlotAreas.ColumnDefinitions.Add(new PlotAreaColumnDefinition()
{ Width= new GridLength(100) });
// heights
// the height of first plot area is 1*
chart.View.PlotAreas.RowDefinitions.Add(new PlotAreaRowDefinition()
{ Height = new GridLength(1, GridUnitType.Star) });
// the height of second plot area is 2*
chart.View.PlotAreas.RowDefinitions.Add(new PlotAreaRowDefinition()
{ Height = new GridLength(2, GridUnitType.Star) });