Back to Devexpress

Series.Smooth Property

officefileapi-devexpress-dot-spreadsheet-dot-charts-dot-series-5d11bf90.md

latest5.6 KB
Original Source

Series.Smooth Property

Gets or sets whether the curve smoothing is turned on for the line or scatter chart.

Namespace : DevExpress.Spreadsheet.Charts

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
bool Smooth { get; set; }
vb
Property Smooth As Boolean

Property Value

TypeDescription
Boolean

true , to turn on the curve smoothing; otherwise, false.

|

Remarks

The following code sample creates a complex chart that contains a series of the ChartType.Line type with curve smoothing.

View Example

csharp
Worksheet worksheet = workbook.Worksheets["chartTask5"];
workbook.Worksheets.ActiveWorksheet = worksheet;

// Create a chart and specify its location
Chart chart = worksheet.Charts.Add(ChartType.ColumnClustered, worksheet["B2:D8"]);
chart.TopLeftCell = worksheet.Cells["F2"];
chart.BottomRightCell = worksheet.Cells["L15"];

// Change the chart type of the second series
chart.Series[1].ChangeType(ChartType.Line);
chart.Series[1].Smooth = true;

// Use secondary axes
chart.Series[1].AxisGroup = AxisGroup.Secondary;

// Specify the chart style
chart.Style = ChartStyle.ColorGradient;

// Set the position of the legend
chart.Legend.Position = LegendPosition.Bottom;
vb
Dim worksheet As Worksheet = workbook.Worksheets("chartTask5")
workbook.Worksheets.ActiveWorksheet = worksheet

' Create a chart and specify its location
Dim chart As Chart = worksheet.Charts.Add(ChartType.ColumnClustered, worksheet("B2:D8"))
chart.TopLeftCell = worksheet.Cells("F2")
chart.BottomRightCell = worksheet.Cells("L15")

' Change the chart type of the second series
chart.Series(1).ChangeType(ChartType.Line)
chart.Series(1).Smooth = True

' Use secondary axes
chart.Series(1).AxisGroup = AxisGroup.Secondary

' Specify the chart style
chart.Style = ChartStyle.ColorGradient

' Set the position of the legend
chart.Legend.Position = LegendPosition.Bottom

The following code snippets (auto-collected from DevExpress Examples) contain references to the Smooth property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-spreadsheet-chart-api/CS/SpreadsheetWPFChartAPISamples/CodeExamples/ViewOptionsActions.cs#L77

csharp
// Turn on curve smoothing.
chart.Series[0].Smooth = true;
// Hide the legend.

winforms-spreadsheet-chart-api/CS/SpreadsheetChartAPISamples/CodeExamples/ViewOptionsActions.cs#L77

csharp
// Turn on curve smoothing.
chart.Series[0].Smooth = true;
// Hide the legend.

spreadsheet-document-api-chart-examples/CS/SpreadsheetDocServerChartAPISamples/CodeExamples/ViewOptionsActions.cs#L90

csharp
// Turn on curve smoothing.
chart.Series[0].Smooth = true;
// Hide the legend.

wpf-spreadsheet-chart-api/VB/SpreadsheetWPFChartAPISamples/CodeExamples/ViewOptionsActions.vb#L81

vb
' Turn on curve smoothing.
chart.Series(0).Smooth = True
' Hide the legend.

winforms-spreadsheet-chart-api/VB/SpreadsheetChartAPISamples/CodeExamples/ViewOptionsActions.vb#L80

vb
' Turn on curve smoothing.
chart.Series(0).Smooth = True
' Hide the legend.

spreadsheet-document-api-chart-examples/VB/SpreadsheetDocServerChartAPISamples/CodeExamples/ViewOptionsActions.vb#L86

vb
' Turn on curve smoothing.
chart.Series(0).Smooth = True
' Hide the legend.

See Also

Series Interface

Series Members

DevExpress.Spreadsheet.Charts Namespace