-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added docs structure and API Reference docs.
- Loading branch information
1 parent
922eb8b
commit b21deb6
Showing
12 changed files
with
138 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# [⮪](../README.md) Frequently Asked Questions | ||
Have some questions? Check the links below to see if we've answered it. Otherwise create a [discussion](https://github.com/DashTheDev/EZCharts.Maui.Donut/blob/master/.github/CONTRIBUTING.md#discussions)! | ||
|
||
## Links | ||
Coming soon... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Documentation | ||
Welcome to the EZCharts.Maui.Donut documentation! | ||
|
||
These docs are your one stop shop for everything you'll need to know about EZCharts.Maui.Donut. If there's anything that's missing or not explained well enough, feel free to make a [contribution](https://github.com/DashTheDev/EZCharts.Maui.Donut/blob/master/.github/CONTRIBUTING.md)! | ||
|
||
## Links | ||
- [API Reference](Reference/README.md) | ||
- [Samples](Samples/README.md) | ||
- [FAQ](FAQ/README.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# [⮪](README.md) DataEntry | ||
A class used to act as the out of the box data entry model for setting up [`DonutChartView.EntriesSource`](DonutChartView.md). | ||
|
||
```C# | ||
public class DataEntry | ||
``` | ||
|
||
**Inheritance:** [Object](https://learn.microsoft.com/en-us/dotnet/api/system.object?view=net-8.0) -> DataEntry | ||
|
||
## Properties | ||
| Name | Type | Default | Description | | ||
|:-:|:-:|:-:|:-:| | ||
| Value | [`float`](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/floating-point-numeric-types#:~:text=.NET%20type-,float,-%C2%B11.5%20x%2010) | `0f` | The <see langword="float"/> value to use for determining the amount of chart area this entry will use. | | ||
| Label | [`string`](https://learn.microsoft.com/en-us/dotnet/api/system.string?view=net-8.0) | `""` | The label to use for displaying what this entry represents. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# [⮪](README.md) DonutChartView | ||
A [SKCanvasView](https://github.com/mono/SkiaSharp/blob/main/source/SkiaSharp.Views.Maui/SkiaSharp.Views.Maui.Controls/SKCanvasView.cs) used to render customisable donut charts. | ||
|
||
```C# | ||
public class DonutChartView : SKCanvasView, IPadding | ||
``` | ||
|
||
**Inheritance:** [Object](https://learn.microsoft.com/en-us/dotnet/api/system.object?view=net-8.0) -> [BindableObject](https://learn.microsoft.com/en-us/dotnet/api/microsoft.maui.controls.bindableobject?view=net-maui-8.0) -> [Element](https://learn.microsoft.com/en-us/dotnet/api/microsoft.maui.controls.element?view=net-maui-8.0) -> [NavigableElement](https://learn.microsoft.com/en-us/dotnet/api/microsoft.maui.controls.navigableelement?view=net-maui-8.0) -> [VisualElement](https://learn.microsoft.com/en-us/dotnet/api/microsoft.maui.controls.visualelement?view=net-maui-8.0) -> [View](https://learn.microsoft.com/en-us/dotnet/api/microsoft.maui.controls.view?view=net-maui-8.0) -> [SKCanvasView](https://github.com/mono/SkiaSharp/blob/main/source/SkiaSharp.Views.Maui/SkiaSharp.Views.Maui.Controls/SKCanvasView.cs) -> DonutChartView | ||
|
||
**Implements:** [IPadding](https://learn.microsoft.com/en-us/dotnet/api/microsoft.maui.ipadding?view=net-maui-8.0) | ||
|
||
## Events | ||
| Name | Type | Description | | ||
|:-:|:-:|:-:| | ||
| EntryClicked | [`EntryClickEventArgs`](EntryClickEventArgs.md) | Raised whenever a segment on the chart is clicked. | | ||
|
||
## Properties | ||
| Name | Type | Bindable | Default | Description | | ||
|:-:|:-:|:-:|:-:|:-:| | ||
| EntriesSource | [`IEnumerable`](https://learn.microsoft.com/en-us/dotnet/api/system.collections.ienumerable?view=net-8.0) | ✅ | An empty [`ObservableCollection<object>`](https://learn.microsoft.com/en-us/dotnet/api/system.collections.objectmodel.observablecollection-1?view=net-8.0) | The source of entry data to be used for rendering the chart. It is expected that these entries be some sort of class with value and label properties. | | ||
| EntryValuePath | [`string`](https://learn.microsoft.com/en-us/dotnet/api/system.string?view=net-8.0) | ✅ | `"Value"` | The path of the value property (expected to be of type [`float`](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/floating-point-numeric-types#:~:text=.NET%20type-,float,-%C2%B11.5%20x%2010)) to be used for determining each entry's segment size. | | ||
| EntryLabelPath | [`string`](https://learn.microsoft.com/en-us/dotnet/api/system.string?view=net-8.0) | ✅ | `"Label"` | The path of the label property (expected to be of type [`string`](https://learn.microsoft.com/en-us/dotnet/api/system.string?view=net-8.0)) to be used for a friendly display for each entry. | | ||
| EntryIconTemplate | [`DataTemplate?`](https://learn.microsoft.com/en-us/dotnet/api/microsoft.maui.controls.datatemplate?view=net-maui-8.0) | ✅ | `null` | The template to be used for rendering the image for each data entry. This template's resulting view is expected to be a [`FileImageSource`](https://learn.microsoft.com/en-us/dotnet/api/microsoft.maui.controls.fileimagesource?view=net-maui-8.0). | | ||
| EntryImageScale | [`float`](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/floating-point-numeric-types#:~:text=.NET%20type-,float,-%C2%B11.5%20x%2010) | ✅ | `0.1f` | The scale to apply to the rendered entry image. | | ||
| EntryColors | [`Color[]`](https://learn.microsoft.com/en-us/dotnet/api/microsoft.maui.graphics.color?view=net-maui-8.0) | ✅ | `Blue, Green, Yellow, Purple, Orange` | The colors to use for representing each data entry on the chart. These colors will loop if there are more entries than colors. | | ||
| EntryClickedCommand | [`ICommand?`](https://learn.microsoft.com/en-us/dotnet/api/system.windows.input.icommand?view=net-8.0) | ✅ | `null` | The command to be invoked when an entry is clicked. This command will receive an `object` parameter which represents the clicked entry. | | ||
| Padding | [`Thickness`](https://learn.microsoft.com/en-us/dotnet/api/microsoft.maui.thickness?view=net-maui-8.0) | ✅ | `10, 10, 10, 10` | The padding applied to the entire view. | | ||
| ChartRotationDegrees | [`float`](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/floating-point-numeric-types#:~:text=.NET%20type-,float,-%C2%B11.5%20x%2010) | ✅ | `90f` | The rotation offset to be applied to the chart. | | ||
| ChartOuterRadius | [`float`](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/floating-point-numeric-types#:~:text=.NET%20type-,float,-%C2%B11.5%20x%2010) | ✅ | `250f` | The radius of the outside ring of the chart. | | ||
| ChartInnerRadius | [`float`](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/floating-point-numeric-types#:~:text=.NET%20type-,float,-%C2%B11.5%20x%2010) | ✅ | `125f` | The radius of the inside ring of the chart. | | ||
| LabelStyle | [`LabelStyle`](/LabelStyle.md) | ✅ | `LabelStyle.Key` | The style in which to display labels on the chart. | | ||
| LabelFontFamily | [`string`](https://learn.microsoft.com/en-us/dotnet/api/system.string?view=net-8.0) | ✅ | `"Arial"` | The system font family to be used for rendering label text. | | ||
| LabelFontColor | [`Color`](https://learn.microsoft.com/en-us/dotnet/api/microsoft.maui.graphics.color?view=net-maui-8.0) | ✅ | `White` | The color used for rendering label text. | | ||
| LabelUseAutoFontColor | [`bool`](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/bool) | ✅ | `false` | Determines if each entry's color will be used to render the corresponding label text or not. | | ||
| LabelFontSize | [`float`](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/floating-point-numeric-types#:~:text=.NET%20type-,float,-%C2%B11.5%20x%2010) | ✅ | `20f` | The size used for rendering label text. | | ||
| LabelKeySpacing | [`float`](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/floating-point-numeric-types#:~:text=.NET%20type-,float,-%C2%B11.5%20x%2010) | ✅ | `10f` | The amount of vertical spacing between each label when `LabelStyle` is set to `LabelStyle.Key`. | | ||
| LabelKeyColorOffset | [`float`](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/floating-point-numeric-types#:~:text=.NET%20type-,float,-%C2%B11.5%20x%2010) | ✅ | `20f` | The amount of horizontal spacing between each label and its corresponding color when `LabelStyle` is set to `LabelStyle.Key`. | | ||
| LabelOutsideRadius | [`float`](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/floating-point-numeric-types#:~:text=.NET%20type-,float,-%C2%B11.5%20x%2010) | ✅ | `50f` | The radius from the `ChartOuterRadius` where entry labels will be rendered when `LabelStyle` is set to `LabelStyle.Outside`. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# [⮪](README.md) EntryClickEventArgs | ||
An [EventArgs](https://learn.microsoft.com/en-us/dotnet/api/system.eventargs?view=net-8.0) class used to provide arguments for the [`DonutChartView.EntryClicked`](DonutChartView.md) event. | ||
|
||
```C# | ||
public sealed class EntryClickEventArgs(object entry) : EventArgs | ||
``` | ||
|
||
**Inheritance:** [Object](https://learn.microsoft.com/en-us/dotnet/api/system.object?view=net-8.0) -> [EventArgs](https://learn.microsoft.com/en-us/dotnet/api/system.eventargs?view=net-8.0) -> EntryClickEventArgs | ||
|
||
## Properties | ||
| Name | Type | Description | | ||
|:-:|:-:|:-:| | ||
| Entry | [`object`](https://learn.microsoft.com/en-us/dotnet/api/system.object?view=net-8.0) | The data entry [`object`](https://learn.microsoft.com/en-us/dotnet/api/system.object?view=net-8.0) that was clicked. The type of this [`object`](https://learn.microsoft.com/en-us/dotnet/api/system.object?view=net-8.0) will be the same as the entry types bound to the [`DonutChartView.EntriesSource`](DonutChartView.md). | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# [⮪](README.md) LabelStyle | ||
An [`enumeration`](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/enum) for adjusting how labels are displayed on the [`DonutChartView`](DonutChartView.md). | ||
|
||
```C# | ||
public enum LabelStyle | ||
``` | ||
|
||
**Inheritance:** [Object](https://learn.microsoft.com/en-us/dotnet/api/system.object?view=net-8.0) -> [ValueType](https://learn.microsoft.com/en-us/dotnet/api/system.valuetype?view=net-8.0) -> [Enum](https://learn.microsoft.com/en-us/dotnet/api/system.enum?view=net-8.0) -> LabelStyle | ||
|
||
## Fields | ||
| Name | Value | Description | | ||
|:-:|:-:|:-:| | ||
| Key | `0` | Labels will be displayed to the side of the chart in a list format with their corresponding chart colors. | | ||
| Outside | `1` | Labels will be displayed along the outer radius of the chart. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# [⮪](../README.md) API Reference | ||
This is the documentation detailing the EZCharts.Maui.Donut public API. | ||
|
||
## Links | ||
- [DonutChartView](DonutChartView.md) | ||
- [DataEntry](DataEntry.md) | ||
- [EntryClickEventArgs](EntryClickEventArgs.md) | ||
- [LabelStyle](LabelStyle.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# [⮪](../README.md) Samples | ||
Want to see some code in action? Check the links below to help you get started. | ||
|
||
## Links | ||
Coming soon... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters