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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback


Overview

The Xamarin.Forms stacked line charts visualize the data with y-values stacked over one another in the series order. It shows the relationship between individual values to the total sum of the points.

The Beautiful Xamarin.Forms Stacked Line Charts


Key features

The Xamarin.Forms chart shows the color and line customization in stacked line chart

UI Customization

Customizes the color and line of a stacked line chart using built-in APIs to make it visually unique.

The Xamarin.Forms chart shows the Vertical rendering in stacked line chart

Vertical rendering

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

The Xamarin.Forms charts show the markers in stacked line 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.


The Xamarin.Forms chart shows the data labels support in stacked line chart

Data labels

Show the detail about the data points with the help of the data label support. Can place the label inside and outside of the chart. Use the connector line to connect the outside label with charts.


Code example

<?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:StackingLineSeries ItemsSource="{Binding Data}" XBindingPath="Category" YBindingPath="Expense"/>

	</chart:SfChart>

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

    public double Expense { get; set; }

    public Model(string xValue, double yValue)
    {
        Category = xValue;
        Expense = yValue;
    }
}

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

    public ViewModel()
    {
        Data = new ObservableCollection<Model>()
        {
           new Model("Food", 88),
           new Model("Transport", 75),
           new Model("Medical", 68),
           new Model("Clothes", 70),
           new Model("Books", 65),
           new Model("Others", 73),
        };
    }
}

Learning resources

Navigate to GitHub code used to configure the Xamarin.Forms stacked line chart

GitHub Code

The Xamarin.Forms stacked line chart configuration code is available in GitHub.

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

Stacked Line Chart User Guide

Learn available options to customize the Xamarin.Forms stacked line chart.

Navigate to the API references documentation of Xamarin.Forms stacked line chart

Stacked Line Chart API Reference

Explore the Xamarin.Forms stacked line 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

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon