Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions ChartAxisDemo/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
namespace ChartAxisDemo;

public partial class App : Application
namespace ChartAxisDemo
{
public App()
{
InitializeComponent();
public partial class App : Application
{
public App()
{
InitializeComponent();
}

MainPage = new AppShell();
}
}
protected override Window CreateWindow(IActivationState? activationState)
{
return new Window(new AppShell());
}
}
}
15 changes: 8 additions & 7 deletions ChartAxisDemo/AppShell.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
namespace ChartAxisDemo;

public partial class AppShell : Shell
namespace ChartAxisDemo
{
public AppShell()
{
InitializeComponent();
}
public partial class AppShell : Shell
{
public AppShell()
{
InitializeComponent();
}
}
}
30 changes: 21 additions & 9 deletions ChartAxisDemo/ChartAxisDemo.csproj
Original file line number Diff line number Diff line change
@@ -1,29 +1,40 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net9.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks> -->
<!-- <TargetFrameworks>$(TargetFrameworks);net9.0-tizen</TargetFrameworks> -->

<!-- Note for MacCatalyst:
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
When specifying both architectures, use the plural <RuntimeIdentifiers> instead of the singular <RuntimeIdentifier>.
The Mac App Store will NOT accept apps with ONLY maccatalyst-arm64 indicated;
either BOTH runtimes must be indicated or ONLY macatalyst-x64. -->
<!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> -->

<OutputType>Exe</OutputType>
<RootNamespace>ChartAxisDemo</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<!-- Display name -->
<ApplicationTitle>ChartAxisDemo</ApplicationTitle>

<!-- App Identifier -->
<ApplicationId>com.companyname.chartaxisdemo</ApplicationId>
<ApplicationIdGuid>C02D7503-2557-4DEC-B364-AFF1D7D5B06D</ApplicationIdGuid>

<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<!-- To develop, package, and publish an app to the Microsoft Store, see: https://aka.ms/MauiTemplateUnpackaged -->
<WindowsPackageType>None</WindowsPackageType>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
Expand All @@ -39,7 +50,7 @@

<!-- Images -->
<MauiImage Include="Resources\Images\*" />
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />
<MauiImage Update="Resources\Images\dotnet_bot.png" Resize="True" BaseSize="300,185" />

<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />
Expand All @@ -49,8 +60,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Syncfusion.Maui.Core" Version="*" />
<PackageReference Include="Syncfusion.Maui.Charts" Version="*" />
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0" />
<PackageReference Include="Syncfusion.Maui.Charts" Version="*" />
</ItemGroup>

</Project>
8 changes: 0 additions & 8 deletions ChartAxisDemo/ChartAxisDemo.csproj.user

This file was deleted.

16 changes: 7 additions & 9 deletions ChartAxisDemo/ChartAxisDemo.sln
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31611.283
VisualStudioVersion = 17.13.35931.197 d17.13
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChartAxisDemo", "ChartAxisDemo.csproj", "{52894750-6BC3-4938-B901-3AC7D8BAB8F2}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChartAxisDemo", "ChartAxisDemo.csproj", "{2DE70760-A072-4E3F-8D90-4E93F746BE0D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{52894750-6BC3-4938-B901-3AC7D8BAB8F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{52894750-6BC3-4938-B901-3AC7D8BAB8F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{52894750-6BC3-4938-B901-3AC7D8BAB8F2}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{52894750-6BC3-4938-B901-3AC7D8BAB8F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{52894750-6BC3-4938-B901-3AC7D8BAB8F2}.Release|Any CPU.Build.0 = Release|Any CPU
{52894750-6BC3-4938-B901-3AC7D8BAB8F2}.Release|Any CPU.Deploy.0 = Release|Any CPU
{2DE70760-A072-4E3F-8D90-4E93F746BE0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2DE70760-A072-4E3F-8D90-4E93F746BE0D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2DE70760-A072-4E3F-8D90-4E93F746BE0D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2DE70760-A072-4E3F-8D90-4E93F746BE0D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572}
SolutionGuid = {047A8563-AD1A-46B3-B687-6097F0A13D7D}
EndGlobalSection
EndGlobal
20 changes: 10 additions & 10 deletions ChartAxisDemo/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@
</chart:SfCartesianChart.YAxes>

<chart:LineSeries ItemsSource="{Binding Data}"
XBindingPath="Time"
YBindingPath="Speed"
Label="Speed"
Fill="Blue" />
XBindingPath="Time"
YBindingPath="Speed"
Label="Speed"
Fill="Blue" />

<chart:SplineSeries ItemsSource="{Binding Data}"
XBindingPath="Time"
YBindingPath="Pressure"
Label="Pressure"
Fill="Green"
YAxisName="yAxis2"/>
XBindingPath="Time"
YBindingPath="Pressure"
Label="Pressure"
Fill="Green"
YAxisName="yAxis2"/>

</chart:SfCartesianChart>
</Grid>

</ContentPage>
16 changes: 8 additions & 8 deletions ChartAxisDemo/MainPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
namespace ChartAxisDemo;

public partial class MainPage : ContentPage
namespace ChartAxisDemo
{
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}

public MainPage()
{
InitializeComponent();
}
}

}

39 changes: 23 additions & 16 deletions ChartAxisDemo/MauiProgram.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
using Syncfusion.Maui.Core.Hosting;
namespace ChartAxisDemo;
using Microsoft.Extensions.Logging;
using Syncfusion.Maui.Core.Hosting;

public static class MauiProgram
namespace ChartAxisDemo
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureSyncfusionCore()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureSyncfusionCore()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});

return builder.Build();
}
#if DEBUG
builder.Logging.AddDebug();
#endif

return builder.Build();
}
}
}
9 changes: 5 additions & 4 deletions ChartAxisDemo/Platforms/Android/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
using Android.Content.PM;
using Android.OS;

namespace ChartAxisDemo;

[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
public class MainActivity : MauiAppCompatActivity
namespace ChartAxisDemo
{
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
public class MainActivity : MauiAppCompatActivity
{
}
}
19 changes: 10 additions & 9 deletions ChartAxisDemo/Platforms/Android/MainApplication.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
using Android.App;
using Android.Runtime;

namespace ChartAxisDemo;

[Application]
public class MainApplication : MauiApplication
namespace ChartAxisDemo
{
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
: base(handle, ownership)
{
}
[Application]
public class MainApplication : MauiApplication
{
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
: base(handle, ownership)
{
}

protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
}
11 changes: 6 additions & 5 deletions ChartAxisDemo/Platforms/MacCatalyst/AppDelegate.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
using Foundation;

namespace ChartAxisDemo;

[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
namespace ChartAxisDemo
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
}
14 changes: 14 additions & 0 deletions ChartAxisDemo/Platforms/MacCatalyst/Entitlements.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<!-- See https://aka.ms/maui-publish-app-store#add-entitlements for more information about adding entitlements.-->
<dict>
<!-- App Sandbox must be enabled to distribute a MacCatalyst app through the Mac App Store. -->
<key>com.apple.security.app-sandbox</key>
<true/>
<!-- When App Sandbox is enabled, this value is required to open outgoing network connections. -->
<key>com.apple.security.network.client</key>
<true/>
</dict>
</plist>

10 changes: 9 additions & 1 deletion ChartAxisDemo/Platforms/MacCatalyst/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- The Mac App Store requires you specify if the app uses encryption. -->
<!-- Please consult https://developer.apple.com/documentation/bundleresources/information_property_list/itsappusesnonexemptencryption -->
<!-- <key>ITSAppUsesNonExemptEncryption</key> -->
<!-- Please indicate <true/> or <false/> here. -->

<!-- Specify the category for your app here. -->
<!-- Please consult https://developer.apple.com/documentation/bundleresources/information_property_list/lsapplicationcategorytype -->
<!-- <key>LSApplicationCategoryType</key> -->
<!-- <string>public.app-category.YOUR-CATEGORY-HERE</string> -->
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UIRequiredDeviceCapabilities</key>
Expand Down
21 changes: 11 additions & 10 deletions ChartAxisDemo/Platforms/MacCatalyst/Program.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
using ObjCRuntime;
using UIKit;

namespace ChartAxisDemo;

public class Program
namespace ChartAxisDemo
{
// This is the main entry point of the application.
static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main(args, null, typeof(AppDelegate));
}
public class Program
{
// This is the main entry point of the application.
static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main(args, null, typeof(AppDelegate));
}
}
}
19 changes: 10 additions & 9 deletions ChartAxisDemo/Platforms/Tizen/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
using Microsoft.Maui;
using Microsoft.Maui.Hosting;

namespace ChartAxisDemo;

class Program : MauiApplication
namespace ChartAxisDemo
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
internal class Program : MauiApplication
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();

static void Main(string[] args)
{
var app = new Program();
app.Run(args);
}
static void Main(string[] args)
{
var app = new Program();
app.Run(args);
}
}
}
Loading