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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback


Overview

The Xamarin.Forms histogram chart is a bar (column) chart used for frequency distribution in which the widths of the bars are proportional to classes into which variables have been divided and the heights of the bars are proportional to class frequencies.

Beautiful Xamarin.Forms Histogram Chart


Key features

Xamarin.Forms chart shows the histogram chart distribution curve

Distribution curve

Provides a graphical representation of the normal distribution of data.

Xamarin.Forms chart shows the data labels

Data labels

Data points can easily be annotated with data labels to improve readability.

Xamarin.Forms chart shows the color and border customization

UI customization

Customizes the color and border of the histogram chart using built-in APIs to make it visually unique.


Code example

Easily get started with Xamarin Histogram 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:HistogramSeries 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 histogram chart

GitHub Code

Explore the Xamarin.Forms Histogram 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 histogram chart

Histogram Chart User Guide

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

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

Histogram Chart API Reference

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