# Data Series

## Content

A data series is a collection of data points that represents the data trends for a specific set of data values. A data point can have both a marker and a label.
You can plot one or more data series while creating a chart. Each series represents an item on the legend. You can get and set a series item using the [ApplyDataLabels](/spreadnet/api/latest/online-win/GrapeCity.Spreadsheet/GrapeCity.Spreadsheet.Charts.ISeries.ApplyDataLabels.html) method of the [ISeries](/spreadnet/api/latest/online-win/GrapeCity.Spreadsheet/GrapeCity.Spreadsheet.Charts.ISeries.html)` `interface. By applying various formatting options, you can also create visually appealing and informative charts that effectively communicate data insights.
However, if you are plotting negative values on a chart, Spread Windows Forms also lets you reverse the color of those negative values by setting [invertIfNegative](/spreadnet/api/latest/online-win/GrapeCity.Spreadsheet/GrapeCity.Spreadsheet.Charts.ISeries.InvertIfNegative.html) property to true. It helps in highlighting and differentiating negative values from positive values.
![image](https://cdn.mescius.io/document-site-files/images/53cc02a8-8309-45ab-805b-7f04955cf00b/image.c44867.png)
The following example code shows how to configure and customize the series in a chart.
**C#**

```csharp
fpSpread1.Features.EnhancedShapeEngine = true;
fpSpread1.Features.EnhancedChartEngine = true;
fpSpread1.AsWorkbook().ActiveSheet.Cells[0, 1].Value = "Q1";
fpSpread1.AsWorkbook().ActiveSheet.Cells[0, 2].Value = "Q2";
fpSpread1.AsWorkbook().ActiveSheet.Cells[0, 3].Value = "Q3";
fpSpread1.AsWorkbook().ActiveSheet.Cells[1, 0].Value = "Mobile Phones";
fpSpread1.AsWorkbook().ActiveSheet.Cells[2, 0].Value = "Laptops";
fpSpread1.AsWorkbook().ActiveSheet.Cells[3, 0].Value = "Tablets";
Random random = new Random();
for (var r = 1; r <= 3; r++)
{
    for (var c = 1; c <= 3; c++)
    {
        fpSpread1.AsWorkbook().ActiveSheet.Cells[r, c].Value = 0 + random.Next(0, 100);
    }
}
fpSpread1.AsWorkbook().ActiveSheet.Cells["A1:D4"].Select();
fpSpread1.AsWorkbook().ActiveSheet.Shapes.AddChart(GrapeCity.Spreadsheet.Charts.ChartType.ColumnClustered, 100, 150, 400, 300, true);
fpSpread1.AsWorkbook().ActiveSheet.ChartObjects[0].Chart.ChartTitle.Text = "Sales Report";
// No data lable is visible for the series index 0.
var series1 = fpSpread1.AsWorkbook().ActiveSheet.ChartObjects[0].Chart.Series[0];
series1.ApplyDataLabels(DataLabelVisibilities.None);
// Show category names for the series index 1.
var series2 = fpSpread1.AsWorkbook().ActiveSheet.ChartObjects[0].Chart.Series[1];
series2.ApplyDataLabels(DataLabelVisibilities.CategoryName);
// Show vary colors for each data points.
fpSpread1.AsWorkbook().ActiveSheet.ChartObjects[0].Chart.ChartGroups[0].VaryByCategories = true;
// Set fill for data points of series.
fpSpread1.AsWorkbook().ActiveSheet.ChartObjects[0].Chart.Series[0].Format.Fill.Patterned(GrapeCity.Drawing.PatternType.Cross);
// Show invert color for negative values.
fpSpread1.AsWorkbook().ActiveSheet.ChartObjects[0].Chart.Series[0].InvertIfNegative = true;
```

**VB**

```vbnet
fpSpread1.Features.EnhancedShapeEngine = True
fpSpread1.Features.EnhancedChartEngine = True
fpSpread1.AsWorkbook().ActiveSheet.Cells(0, 1).Value = "Q1"
fpSpread1.AsWorkbook().ActiveSheet.Cells(0, 2).Value = "Q2"
fpSpread1.AsWorkbook().ActiveSheet.Cells(0, 3).Value = "Q3"
fpSpread1.AsWorkbook().ActiveSheet.Cells(1, 0).Value = "Mobile Phones"
fpSpread1.AsWorkbook().ActiveSheet.Cells(2, 0).Value = "Laptops"
fpSpread1.AsWorkbook().ActiveSheet.Cells(3, 0).Value = "Tablets"
Dim random As New Random()
For r As Integer = 1 To 3
    For c As Integer = 1 To 3
        fpSpread1.AsWorkbook().ActiveSheet.Cells(r, c).Value = 0 + random.Next(0, 100)
    Next
Next
fpSpread1.AsWorkbook().ActiveSheet.Cells("A1:D4").Select()
fpSpread1.AsWorkbook().ActiveSheet.Shapes.AddChart(GrapeCity.Spreadsheet.Charts.ChartType.ColumnClustered, 100, 150, 400, 300, True)
fpSpread1.AsWorkbook().ActiveSheet.ChartObjects(0).Chart.ChartTitle.Text = "Sales Report"
' No data label is visible for the series index 0.
Dim series1 = fpSpread1.AsWorkbook().ActiveSheet.ChartObjects(0).Chart.Series(0)
series1.ApplyDataLabels(DataLabelVisibilities.None)
' Show category names for the series index 1.
Dim series2 = fpSpread1.AsWorkbook().ActiveSheet.ChartObjects(0).Chart.Series(1)
series2.ApplyDataLabels(DataLabelVisibilities.CategoryName)
' Show vary colors for each data points.
fpSpread1.AsWorkbook().ActiveSheet.ChartObjects(0).Chart.ChartGroups(0).VaryByCategories = True
' Set fill for data points of series.
fpSpread1.AsWorkbook().ActiveSheet.ChartObjects(0).Chart.Series(0).Format.Fill.Patterned(GrapeCity.Drawing.PatternType.Cross)
' Show invert color for negative values.
fpSpread1.AsWorkbook().ActiveSheet.ChartObjects(0).Chart.Series(0).InvertIfNegative = True
```