Spread for ASP.NET 12 Product Documentation
Moving and Resizing the Chart Control in Spread
Spread for ASP.NET 12 Product Documentation > Developer's Guide > Working with the Chart Control > Creating Charts > Using the Chart Control in Spread > Moving and Resizing the Chart Control in Spread

You can move and resize the Chart control at design time in the Spread Designer or at run time.

At design time or run time you can move the chart by clicking on it and then dragging the chart on the Spread control with the mouse or you can click on the chart and use the keyboard direction keys. You can resize the chart by selecting it, moving the mouse pointer over one of the indicators and waiting until the mouse pointer changes to a left-right icon or an up-down icon, and then dragging. The following image shows the red outline and indicator symbols.

Resize Indicators

At run time you can allow the user to move or resize the Chart control by setting the CanSize and CanMove properties. The CanSelect property must be true to allow moving and resizing.

Using Code

Set the CanSize and CanMove properties in the SpreadChart class.

Example

The following example sets the CanSize and CanMove properties.

C#
Copy Code
FarPoint.Web.Spread.Chart.SpreadChart chart = new FarPoint.Web.Spread.Chart.SpreadChart;
chart.Model = model;
chart.CanSize = true;
chart.CanMove = false;
fpSpread1.Sheets[0].Charts.Add(chart); 
VB
Copy Code
Dim chart As New FarPoint.Web.Spread.Chart.SpreadChart()
chart.Model = model
chart.CanSize = True
chart.CanMove = False
FpSpread1.Sheets(0).Charts.Add(chart) 

Using the Spread Designer

  1. Select the Chart Tools menu.
  2. Check the AllowResize or AllowMove option (or both).
  3. Click Apply and Exit to close the Spread Designer.