We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Syncfusion Feedback


Overview

The Xamarin.Forms spline chart resembles a line chart, but the difference between them is that instead of connecting the data points with straight lines, the data points are connected by smooth Bezier curves.

Beautiful Xamarin.Forms Spline Chart


Key features

Xamarin.Forms chart shows the different spline types

Spline type

Four different types of rendering such as natural, monotonic, cardinal, and clamped.

Shows the Xamarin.Forms vertical spline chart

Vertical rendering

Rotate the spline chart to plot data in a vertical direction and view data from a different perspective.

The Xamarin.Forms spline chart shows the empty or null point support

Empty points

Empty or null data points are elegantly handled in spline charts.

Xamarin.Forms chart shows the marker support in spline chart

Marker

Marks data points with built-in shapes such as circles, rectangles, ellipses, vertical lines, horizontal lines, diamonds, triangles, and pentagons. In addition to these shapes, use images to make the point more attractive.

Xamarin.Forms chart shows the multiple axis support

Multiple axes

Use multiple axes to plot different data sets that widely vary from one other.


Code example

Easily get started with Xamarin Spline Chart using a few simple lines of C# code, as demonstrated below,

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:ChartExample"
             xmlns:chart="clr-namespace:Syncfusion.SfChart.XForms;assembly=Syncfusion.SfChart.XForms"
             x:Class="ChartExample.MainPage">

    <ContentPage.BindingContext>
        <local:ViewModel/>
    </ContentPage.BindingContext>

    <chart:SfChart>

        <chart:SfChart.PrimaryAxis>
            <chart:CategoryAxis/>
        </chart:SfChart.PrimaryAxis>

        <chart:SfChart.SecondaryAxis>
            <chart:NumericalAxis/>
        </chart:SfChart.SecondaryAxis>

        <chart:SplineSeries ItemsSource="{Binding Data}" XBindingPath="Month" YBindingPath="Target"/>

    </chart:SfChart>

</ContentPage>
public class Model
{
    public string Month { get; set; }

    public double Target { get; set; }

    public Model(string xValue, double yValue)
    {
        Month = xValue;
        Target = yValue;
    }
}

public class ViewModel
{
    public ObservableCollection<Model> Data { get; set; }

    public ViewModel()
    {
        Data = new ObservableCollection<Model>()
        {
            new Model("Jan", 50),
            new Model("Feb", 70),
            new Model("Mar", 65),
            new Model("Apr", 57),
            new Model("May", 48), 
        };
    }
}

Learning resources

Navigate to GitHub code used to configure the Xamarin.Forms spline chart

GitHub Code

Explore the Xamarin.Forms Spline Chart example from GitHub to learn how to render and configure charts.

Navigate to the options available in User Guide to customize the Xamarin.Forms spline chart

Spline Chart User Guide

Learn available options to customize the Xamarin.Forms spline chart.

Navigate to the API references documentation of Xamarin.Forms spline chart

Spline Chart API Reference

Explore the Xamarin.Forms spline chart APIs.


150+ XAMARIN UI CONTROLS

ALL CONTROLS
  • Xamarin.Forms
  • Xamarin.Android
  • Xamarin.iOS
The most downloaded control (based on the nuget.org download count).
Scroll up icon