Giter Site home page Giter Site logo

skia-chart's Introduction

GitHub license Actions Status GitHub last commit GitHub issues nuget Nuget

Built with ❤︎ by Ndubuisi Jr Chukuigwe


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

  • Line Chart.
  • Bar Chart.
  • Scatter Chart.
  • Area Chart.
  • Radial Chart.
  • Donut Chart.

Features

  • Horizontal axis title.
  • Vertical axis title.
  • Legend
  • Point markers for line and area charts.
  • Plots multiple line chart on the same axis.
  • Plots multiple bars on the same axis.
  • Plots multiple scatter points on the same axis.
  • Plots multiple area charts on the same axis.

Supported Platforms

  • Android
  • IOS
  • UWP
  • macOS
  • GTK
  • WPF

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

Gallery - Without Legend and Title

/

Getting Started

  • Open Nuget package manager for solution
  • Search for SkiaChart.Forms
  • Install on all the projects

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 Test App for typical bindings.

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 Test App for typical bindings.

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 Test App for typical bindings.

Tutorials - Watch the YouTube video below:

Watch the video
Full tutorial series

Contributing

  • Create a Fork from this repository.
  • Clone your fork into your work station.
  • Switch to the development branch.
  • Make your changes on the development branch.
  • Push your changes to your fork.
  • Create a pull request back to the main repository.
  • Add a new remote called upstream to point to the main repository.

License

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

skia-chart's People

Contributors

ekrogh avatar ndubuisijr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

skia-chart's Issues

[Question] Live Graph

Hello together!

First of all, great Plugin! I'm really glad i found it!

Now to my Question: Is it possible to add Points at runtime?
I have a device which changes its speed and i want to show that over the time in a LineChart.
Is it possible ? As i didn't found a way to do it yet but maybe i'm overseeing something.

Greetings bluekuen

how to use via nuget?

I didn't understand how SkiaSharp works. Do I have to import the entire project?
I was unable to import the classes with the nuget library installed.
error

Realtime Moving Line Chart

I would like to make a line chart that the data changes are runtime and moves to the left.

I don't see any way to modify the ConstructionData at runtime, so I added some code to do so.

The issue I now have is how to trigger the canvas to update. The object I have access to is the LineChart and the Chart. I can't seem to make the connection to the CanvasChart to invalidate the Skia canvas.

How do I do this?

A little beautification

Hi

I have tested skia-chart on Android, UWP and macOS. It works really well!

In my copy of skia-chart I have made a couple of changes that I think makes it look better on my devices. I have attached a diff of the files I have changed and the changed files.

Best
Eigil
skia-chart-diff.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.