Net.iOS.Charts 0.0.1-beta3

This is a prerelease version of Net.iOS.Charts.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Net.iOS.Charts --version 0.0.1-beta3
                    
NuGet\Install-Package Net.iOS.Charts -Version 0.0.1-beta3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Net.iOS.Charts" Version="0.0.1-beta3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Net.iOS.Charts" Version="0.0.1-beta3" />
                    
Directory.Packages.props
<PackageReference Include="Net.iOS.Charts" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Net.iOS.Charts --version 0.0.1-beta3
                    
#r "nuget: Net.iOS.Charts, 0.0.1-beta3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Net.iOS.Charts@0.0.1-beta3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Net.iOS.Charts&version=0.0.1-beta3&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Net.iOS.Charts&version=0.0.1-beta3&prerelease
                    
Install as a Cake Tool

This is .NET iOS binding of danielgindi iOS Charts (DGCharts) library

Be aware, library is beta

Not all functionality may be available (like, some setters missing or something) and not all demos and no tests was ported to C#. If you observe any problem – open new issue to prioritize its fix.

Known issues

Sometimes GC can remove class reference of value of properties, which declared type is protocol interfaces.

You can observe this issue in DataSets property of any ChartDataSet subclass. Create some set (e.g. LineChartDataSet), wrap it into array and then set to DataSets property of you LineChartView.Data property. Then after some time try to get this set from DataSets property and cast it to LineChartDataSet and you will observe that it is impossible, as type of this set is ChartDataSetWrapper instead of LineChartDataSet. There is (looks like) similar issue on Xamarin GitHub and workaround for this situation can be found there: instead of using C# casting use

Runtime.GetINativeObject<IProtocolName> (handler.WeakClient.Handle, false);

Launch screen does not work

Suppose it is due to fact that it is in non-standard path for .NET iOS (by default it is in root, here in Resources folder).

ApiDefinition contains setters for properties in protocol interfaces, that doesn't has setters in source protocols.

Example of such protocol is ChartDataProvider: the Data property in ApiDefinition has setter, while correspondent data property in original protocol doesn't. It is because Data property in LineChartView class (that conforms that ChartDataProvider protocol) has setter. You can see in ApiDefinition that ChartViewBase (one of LineChartView's base classes) conforms ChartDataProvider protocol and, moreover, has setter for Data property, but LineChartView, that inherits ChartViewBase doesn't. It looks like it is because of reimplementation of IChartViewProvider interface (of ChartViewProvider protocol) and, hence, inlining all its required properties (such as Data) with required signature (so without setter). Unfortunately, I haven't found any way to prevent this behavior and looks like there is no one for now. You can check open .NET iOS issue that is (probably) causing this: https://github.com/xamarin/xamarin-macios/issues/3217

Product Compatible and additional computed target framework versions.
.NET net8.0-ios17.2 is compatible.  net9.0-ios was computed.  net10.0-ios was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0-ios17.2

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.1-beta4 552 5/14/2024
0.0.1-beta3 93 3/12/2024
0.0.1-beta2 182 12/4/2023
0.0.1-beta 90 12/1/2023