Home

Awesome

<div align="center" >

GitHub license Actions Status GitHub last commit GitHub issues nuget Nuget

<sub>Built with ❤︎ by Ndubuisi Jr Chukuigwe</sub>

</div><br>

skia-chart

A simple xamarin.Forms chart library, built on top of the skiasharp.views.forms library. This library is developed with engineering and statistics in mind. It might not be the prettiest but it will visualize your data appropriately.

Supported Charts

Features

Supported Platforms

Gallery - Display on Android, IOS, UWP, GTK, WPF and macOS

<p> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/Android/area.png" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/Android/bar.png" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/Android/line.png" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/Android/scatter.png" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/Android/radial.JPG" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/Android/donut.JPG" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/iOS/area.png" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/iOS/bar.png" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/iOS/scatter.png" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/UWP/area.png" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/UWP/bar.png" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/UWP/scatter.png" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/UWP/radial.JPG" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/UWP/donut.JPG" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/macOS/area.png" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/macOS/bar.png" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/macOS/scatter.png" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/WPF/line.png" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/WPF/area.png" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/WPF/bar.png" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/WPF/scatter.png" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/WPF/radial.JPG" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/GTK/line.png" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/GTK/area.png" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/GTK/bar.png" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/GTK/scatter.png" width="175"> </p>

Gallery - Without Legend and Title

<p>/ <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/Screenshot_1585258837.png" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/Screenshot_1585492508.png" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/Screenshot_1585603936.png" width="175"> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/Screenshot_1585849946.png" width="175"> </p>

Getting Started

Code Example

Line Chart

XAML-page

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
           xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
           xmlns:d="http://xamarin.com/schemas/2014/forms/design"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:chartview="clr-namespace:SkiaChart.Views;assembly=SkiaChart"
           xmlns:chart="clr-namespace:SkiaChart.Charts;assembly=SkiaChart"
           xmlns:viewModels="clr-namespace:TestApp.ViewModels"
           x:Class="TestApp.Views.LineChartView"
           >
  <ContentPage.BindingContext>
      <viewModels:LineChartViewModel/>
  </ContentPage.BindingContext>
  
  <chartview:ChartCanvas x:TypeArguments="chart:LineChart" x:Name="chartView" 
                         Chart="{Binding Chart}" GridLines="10" />
</ContentPage>

see <a href="https://github.com/NdubuisiJr/skia-chart/tree/master/TestApp/TestApp">Test App<a/> for typical bindings.

<p> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/Screenshot_1585258837.png" width="175" title="Line Chart"> </p>

Bar Chart

XAML-page

<?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:d="http://xamarin.com/schemas/2014/forms/design"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:chartview="clr-namespace:SkiaChart.Views;assembly=SkiaChart"
           xmlns:chart="clr-namespace:SkiaChart.Charts;assembly=SkiaChart"
           xmlns:viewModels="clr-namespace:TestApp.ViewModels"
           x:Class="TestApp.Views.BarChartPage">   
  <ContentPage.BindingContext>
      <viewModels:BarChartViewModel/>
  </ContentPage.BindingContext>
  <chartview:ChartCanvas x:TypeArguments="chart:BarChart" x:Name="chartView" Chart="{Binding Chart}"
                         GridLines="10" GridColor="{Binding GridColor}" />
</ContentPage>

see <a href="https://github.com/NdubuisiJr/skia-chart/tree/master/TestApp/TestApp">Test App<a/> for typical bindings.

<p> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/Screenshot_1585492508.png" width="175" title="Bar chart"> </p>

Scatter Chart

XAML-page

<?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:d="http://xamarin.com/schemas/2014/forms/design"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:chartview="clr-namespace:SkiaChart.Views;assembly=SkiaChart"
           xmlns:chart="clr-namespace:SkiaChart.Charts;assembly=SkiaChart"
           xmlns:viewModels="clr-namespace:TestApp.ViewModels"
           x:Class="TestApp.Views.BarChartPage">   
  <ContentPage.BindingContext>
      <viewModels:ScatterChartViewModel/>
  </ContentPage.BindingContext>
  <chartview:ChartCanvas x:TypeArguments="chart:ScatterChart" x:Name="chartView" Chart="{Binding Chart}"
                         GridLines="10" GridColor="{Binding GridColor}" />
</ContentPage>

see <a href="https://github.com/NdubuisiJr/skia-chart/tree/master/TestApp/TestApp">Test App<a/> for typical bindings.

<p> <img src="https://github.com/NdubuisiJr/skia-chart/blob/master/ProjectFiles/Screenshot_1585603936.png" width="175" title="Scatter chart"> </p>

Tutorials - Watch the YouTube video below:

Watch the video <br/> Full tutorial series

Contributing

License

This project is licensed under the MIT License - see the LICENSE file for details