The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

ShapeComplexFill Interface

Serves as a base for the ShapeGradientFill and ShapePictureFill interfaces and contains specific settings for the gradient and picture fills.

Namespace: DevExpress.Spreadsheet.Drawings

Assembly: DevExpress.Spreadsheet.v19.1.Core.dll

Declaration

public interface ShapeComplexFill
Public Interface ShapeComplexFill
public interface ShapeComplexFill
Public Interface ShapeComplexFill

Remarks

The ShapeComplexFill object's properties enable you to set specific characteristics for the gradient and picture fills. In particular, you can determine whether the fill should be rotated with the shape (ShapeComplexFill.RotateWithShape), specify how to flip the gradient or picture while tiling (ShapeComplexFill.FlipType), set the direction of the gradient and define the fill region for the picture fill (ShapeComplexFill.FillRect).

Examples

The following example demonstrates how to create a scatter chart with straight lines and markers and customize its appearance by applying the complex gradient to the chart background. Set the gradient fill by calling the ShapeOutlineFill.SetGradientFill method, and then specify the gradient direction From Center by utilizing the ShapeComplexFill.FillRect property.

Worksheet worksheet = workbook.Worksheets["chartScatter"];
workbook.Worksheets.ActiveWorksheet = worksheet;

// Create a chart and specify its location.
Chart chart = worksheet.Charts.Add(ChartType.ScatterLineMarkers, worksheet["C2:D52"]);
chart.TopLeftCell = worksheet.Cells["F2"];
chart.BottomRightCell = worksheet.Cells["L17"];

// Set the series line color.
chart.Series[0].Outline.SetSolidFill(Color.FromArgb(0xBC, 0xCF, 0x02));

// Specify the data markers.
Marker markerOptions = chart.Series[0].Marker;
markerOptions.Symbol = MarkerStyle.Diamond;
markerOptions.Size = 10;
markerOptions.Fill.SetSolidFill(Color.FromArgb(0xBC, 0xCF, 0x02));
markerOptions.Outline.SetNoFill();

// Set no fill for the plot area.
chart.PlotArea.Fill.SetNoFill();

// Apply the gradient fill to the chart area.
chart.Fill.SetGradientFill(ShapeGradientType.Circle, Color.FromArgb(0xE3, 0x48, 0x03), Color.FromArgb(0x00, 0x32, 0x86));
ShapeGradientFill gradientFill = chart.Fill.GradientFill;
gradientFill.FillRect.Left = 0.5;
gradientFill.FillRect.Right = 0.5;
gradientFill.FillRect.Bottom = 0.5;
gradientFill.FillRect.Top = 0.5;

// Set the X-axis scale.
Axis axisX = chart.PrimaryAxes[0];
axisX.Scaling.AutoMax = false;
axisX.Scaling.AutoMin = false;
axisX.Scaling.Max = 60.0;
axisX.Scaling.Min = -60.0;
axisX.MajorGridlines.Visible = true;
axisX.Visible = false;

// Set the Y-axis scale.
Axis axisY = chart.PrimaryAxes[1];
axisY.Scaling.AutoMax = false;
axisY.Scaling.AutoMin = false;
axisY.Scaling.Max = 50.0;
axisY.Scaling.Min = -50.0;
axisY.MajorUnit = 10.0;
axisY.Visible = false;

// Hide the chart legend.
chart.Legend.Visible = false;
See Also