# CartesianSeries<TItem> Class

Base class of [RadzenChart](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenChart.md) series.

Namespace: [Radzen.Blazor](https://blazor.radzen.com/docs/api/Radzen.Blazor.md)

Assembly: Radzen.Blazor.dll

## Inheritance

- Object
- ComponentBase
- [RadzenChartComponentBase](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenChartComponentBase.md)
- CartesianSeries<TItem>

## Implements

- IComponent
- IHandleEvent
- IHandleAfterRender
- [IChartSeries](https://blazor.radzen.com/docs/api/Radzen.Blazor.IChartSeries.md)
- [IChartValueAxisSeries](https://blazor.radzen.com/docs/api/Radzen.Blazor.IChartValueAxisSeries.md)

## Syntax

```csharp
public abstract class CartesianSeries<TItem> : RadzenChartComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IChartSeries, IChartValueAxisSeries
```

## Type Parameters

| Name | Description |
|------|-------------|
| TItem | The type of the series data. |

## Constructors

| Constructor | Description |
|-------------|-------------|
| `protected CartesianSeries<TItem>()` | Base class of [RadzenChart](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenChart.md) series. |

## Properties

| Property | Type | Description |
|------|------|-------------|
| CategoryProperty | `string` | The name of the property of TItem that provides the X axis (a.k.a. category axis) values. |
| ChildContent | `RenderFragment` | Gets or sets the child content. |
| Color | `string` |  |
| CoordinateSystem | [`CoordinateSystem`](https://blazor.radzen.com/docs/api/Radzen.CoordinateSystem.md) | Gets the coordinate system of the series. |
| Data | `IEnumerable<TItem>` | Gets or sets the data of the series. The data is enumerated and its items are displayed by the series. |
| Hidden | `bool` | Gets or sets a value indicating whether this [CartesianSeries<T>](https://blazor.radzen.com/docs/api/Radzen.Blazor.CartesianSeries-1.md) is hidden. Hidden series are initially invisible and the user can show them by clicking on their label in the legend. Use the Hidden property to hide certain series from your users but still allow them to see them. |
| Items | `IList<TItem>` | Stores Data as an IList of TItem. |
| MarkerSize | `double` |  |
| MarkerType | [`MarkerType`](https://blazor.radzen.com/docs/api/Radzen.Blazor.MarkerType.md) |  |
| Markers | [`RadzenMarkers`](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenMarkers.md) |  |
| Overlays | `IList<IChartSeriesOverlay>` | Gets the list of overlays. |
| RenderingOrder | `int` |  |
| ShowActivePoint | `bool` | Specifies whether the chart highlights the hovered data point of this series with an active point dot. Range-style series override this to false - a single dot cannot represent their value range. |
| ShowInLegend | `bool` |  |
| ShowLineInLegend | `bool` | Specifies whether the legend swatch displays a line indicator instead of a filled marker. Overridden by line series. |
| Title | `string` |  |
| TooltipTemplate | `RenderFragment<TItem>` | Gets or sets the tooltip template. |
| ValueAxisName | `string` | Gets or sets the name of the value axis this series is bound to. When null or empty, the series uses the primary (default) axis. |
| ValueProperty | `string` | The name of the property of TItem that provides the Y axis (a.k.a. value axis) values. |
| Visible | `bool` | Gets or sets a value indicating whether this [CartesianSeries<T>](https://blazor.radzen.com/docs/api/Radzen.Blazor.CartesianSeries-1.md) is visible. Invisible series do not appear in the legend and cannot be shown by the user. Use the Visible property to programatically show or hide a series. |

## Methods

| Method | Returns | Description |
|------|---------|-------------|
| `BandIntersects(double position, double size, double strokeWidth, double start, double end)` | `bool` | Returns true when the band [position, position + size] (plus the stroke width on both sides) overlaps the pixel range [start, end], so a column or bar outside the zoomed view can be skipped. |
| `ClipToPlotRange(IList<Point<TItem>> points, ScaleBase scale, int neighbors)` | `IList<Point<TItem>>` | Returns the points a line needs in order to draw the part of it that falls inside the pixel range of scale: every point whose segment to its neighbor reaches the range, plus neighbors additional points on each side so the curve tangents at the edges do not change. Returns the original list when every point is needed. Parameters: `points`: The points in series order. `scale`: The category scale whose Output is the visible pixel range. `neighbors`: How many extra points to keep beyond the last point whose segment is visible. |
| `ComposeCategory(ScaleBase scale)` | `Func<TItem, double>` | Helper function. Used internally. |
| `ComposeValue(ScaleBase scale)` | `Func<TItem, double>` | Helper function. Used internally. |
| `Contains(double x, double y, double tolerance)` | `bool` |  |
| `DataAt(double x, double y)` | `ValueTuple<object, Point>` |  |
| `Dispose()` | `void` |  |
| `GetCategories()` | `IList<object>` | Returns the category values |
| `GetDataLabels(double offsetX, double offsetY)` | `IEnumerable<Rendering.ChartDataLabel>` |  |
| `GetDataLabels(double offsetX, double offsetY, DataLabelPosition position)` | `IEnumerable<Rendering.ChartDataLabel>` |  |
| `GetMean()` | `double` |  |
| `GetMedian()` | `double` |  |
| `GetMode()` | `double` |  |
| `GetRawValueGetter()` | `Func<TItem, object>` | Creates a function that returns the raw object value of the ValueProperty (before conversion to double). Used to detect null values in nullable numeric properties. |
| `GetScaledDataPoints()` | `IList<Point>` |  |
| `GetTitle()` | `string` |  |
| `GetTooltipPosition(object data)` | [`Point`](https://blazor.radzen.com/docs/api/Radzen.Blazor.Point.md) |  |
| `GetTrend()` | `ValueTuple<double, double>` | https://en.wikipedia.org/wiki/Simple_linear_regression#Fitting_the_regression_line |
| `IncludeZeroInValueScale(ScaleBase scale, bool zeroBased)` | `void` | Extends the specified value scale to zero when this series or another series on the same scale requires it: when the Range of the value axis is IncludeZero, or when it is Auto and a series is zero based outside a [RadzenSparkline](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenSparkline.md). Call it after merging the values of this series into the scale. A scale whose values are all equal is not extended because its ticks already extend from zero. Logarithmic scales and scales without data are left unchanged. Parameters: `scale`: The value scale. `zeroBased`: Whether this series is filled from a zero baseline, as column, bar and area series are. |
| `Initialize()` | `void` |  |
| `InsidePolygon(Point point, Point[] polygon)` | `bool` | Determines if the provided point is inside the provided polygon. Parameters: `point`: The point. `polygon`: The polygon. Returns: true if the polygon contains the point, false otherwise. |
| `InvokeClick(EventCallback<SeriesClickEventArgs> handler, object data)` | `Task` |  |
| `IsDate(string propertyName)` | `bool` | Determines whether the property with the specified name is DateTime Parameters: `propertyName`: Name of the property. Returns: true if the specified property name is date; otherwise, false. |
| `IsNumeric(string propertyName)` | `bool` | Determines whether the property with the specified name is numeric. Parameters: `propertyName`: Name of the property. Returns: true if the specified property name is numeric; otherwise, false. |
| `IsValueNullable()` | `bool` | Returns true if the ValueProperty type is nullable. |
| `MeasureLegend()` | `double` |  |
| `MeasureLegendItems()` | `IEnumerable<double>` |  |
| `PickColor(int index, IEnumerable<string> colors, string defaultValue, IList<SeriesColorRange> colorRange, double value)` | `string` | Returns a color from the specified list of colors. Rotates colors. Parameters: `index`: The index. `colors`: The colors. `defaultValue`: The default value. `colorRange`: The color range value. `value`: The value of the item. |
| `Render(ScaleBase categoryScale, ScaleBase valueScale)` | `RenderFragment` |  |
| `RenderLegendItem()` | `RenderFragment` |  |
| `RenderLegendItem(bool clickable)` | `RenderFragment` |  |
| `RenderOverlays(ScaleBase categoryScale, ScaleBase valueScale)` | `RenderFragment` |  |
| `RenderSharedTooltipItem(object category)` | `RenderFragment` |  |
| `RenderTooltip(object data)` | `RenderFragment` |  |
| `RenderTopOverlays(ScaleBase categoryScale, ScaleBase valueScale)` | `RenderFragment` |  |
| `RequireChart()` | [`RadzenChart`](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenChart.md) | Returns the parent [RadzenChart](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenChart.md) instance or throws an InvalidOperationException if not present. Returns: The parent [RadzenChart](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenChart.md). |
| `SetParametersAsync(ParameterView parameters)` | `Task` |  |
| `TooltipClass(TItem item)` | `string` | Gets the tooltip CSS class. Parameters: `item`: The item. |
| `TooltipLabel(TItem item)` | `string` | Gets the label of the tooltip displayed for this item. Parameters: `item`: The item. |
| `TooltipStyle(TItem item)` | `string` | Gets the tooltip inline style. Parameters: `item`: The item. |
| `TooltipTitle(TItem item)` | `string` | Gets the title of the tooltip displayed for this item. Parameters: `item`: The item. |
| `TooltipValue(TItem item)` | `string` | Gets the value of the tooltip displayed for this item. Parameters: `item`: The item. Returns: System.String. |
| `TransformCategoryScale(ScaleBase scale)` | [`ScaleBase`](https://blazor.radzen.com/docs/api/Radzen.Blazor.ScaleBase.md) |  |
| `TransformValueScale(ScaleBase scale)` | [`ScaleBase`](https://blazor.radzen.com/docs/api/Radzen.Blazor.ScaleBase.md) |  |
| `TryGetPlotRange(ScaleBase scale, Double& start, Double& end)` | `bool` | Returns the plot-relative pixel range a scale maps to: Boolean) yields coordinates from 0 to OutputSize regardless of the direction of the scale. Returns false when the scale has not been laid out yet and has no pixel extent. Parameters: `scale`: The scale to read. `start`: The smaller pixel coordinate, always 0. `end`: The larger pixel coordinate. |

## Inherited Members

- From [RadzenChartComponentBase](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenChartComponentBase.md): Chart, DidParameterChange, ShouldRefreshChart, ValidateParameters
- From ComponentBase: Assets, AssignedRenderMode, BuildRenderTree, DispatchExceptionAsync, InvokeAsync, OnAfterRender, OnAfterRenderAsync, OnInitialized, OnInitializedAsync, OnParametersSet, OnParametersSetAsync, RendererInfo, ShouldRender, StateHasChanged

