Skip to content

behrangmohseni/Zebble.OxyPlot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zebble.OxyPlot

logo

A Zebble plugin that allow you add OxyPlot charts into the Zebble application.

NuGet

With this plugin you can add different types of charts such as Bar, Pie, Box, etc.


Setup


Api Usage

You can add chart to the Zebble page like below:

public override async Task OnInitializing()
{
    await base.OnInitializing();

    var plotView = new OxyPlotView
    {
        Title = "Title of Chart",
        Axes = new List<Axis> { new CategoryAxis
        {
            Position = AxisPosition.Left,
            Key = "Title of Axis",
            ItemsSource = new[]
            {
                    "Sample 1",
                    "Sample 2",
                    "Sample 3",
                    "Sample 4",
                    "Sample 5"
            }
        } },
        Series = new List<Series> {
            new Series {
                PlotType = PlotTypes.Bar,
                Data = new List<PlotData>
                {
                    new PlotData(value: val1),
                    new PlotData(value: val2),
                    new PlotData(value: val3),
                    new PlotData(value: val4),
                    new PlotData(value: val5)
                }
            }
        }
    };
    
    plotView.Width(100.Percent()).Height(300);
    await plotView.InitializePlot();
    await Add(plotView);
}

Chart Types

There is a property whose name is PlotType in each series that related to the chart type and you can set it to each one that you need.

var series = new List<Series> {
    new Series {
           PlotType = PlotTypes.Bar,
           Data = new List<PlotData>
           {
               new PlotData(value: val1),
               new PlotData(value: val2),
               ...
           }
       },
       ...
    };

Properties

Property Type Android iOS Windows
Title string x x x
Series Series x x x
Axes Axis x x x

Methods

Method Return Type Parameters Android iOS Windows
InitializePlot Task - x x x

About

A plugin to render native charts with OxyPlot

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.9%
  • Batchfile 0.1%