A Zebble plugin that allow you add OxyPlot charts into the Zebble application.
With this plugin you can add different types of charts such as Bar, Pie, Box, etc.
- Available on NuGet: https://www.nuget.org/packages/Zebble.OxyPlot/
- Install in your platform client projects.
- Available for iOS, Android and UWP.
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);
}
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),
...
}
},
...
};
Property | Type | Android | iOS | Windows |
---|---|---|---|---|
Title | string | x | x | x |
Series | Series | x | x | x |
Axes | Axis | x | x | x |
Method | Return Type | Parameters | Android | iOS | Windows |
---|---|---|---|---|---|
InitializePlot | Task | - | x | x | x |