-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e13018a
commit 168c14a
Showing
38 changed files
with
1,155 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.7.34202.233 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleDemo", "SampleDemo\SampleDemo.csproj", "{CF30E96A-687E-47B8-AFA0-85AA9DD747BC}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{CF30E96A-687E-47B8-AFA0-85AA9DD747BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{CF30E96A-687E-47B8-AFA0-85AA9DD747BC}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{CF30E96A-687E-47B8-AFA0-85AA9DD747BC}.Debug|Any CPU.Deploy.0 = Debug|Any CPU | ||
{CF30E96A-687E-47B8-AFA0-85AA9DD747BC}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{CF30E96A-687E-47B8-AFA0-85AA9DD747BC}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{CF30E96A-687E-47B8-AFA0-85AA9DD747BC}.Release|Any CPU.Deploy.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {A09CE0C9-C618-4261-A4AC-5D0AACCE5BC6} | ||
EndGlobalSection | ||
EndGlobal |
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 @@ | ||
<?xml version = "1.0" encoding = "UTF-8" ?> | ||
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:local="clr-namespace:SampleDemo" | ||
x:Class="SampleDemo.App"> | ||
<Application.Resources> | ||
<ResourceDictionary> | ||
<ResourceDictionary.MergedDictionaries> | ||
<ResourceDictionary Source="Resources/Styles/Colors.xaml" /> | ||
<ResourceDictionary Source="Resources/Styles/Styles.xaml" /> | ||
</ResourceDictionary.MergedDictionaries> | ||
</ResourceDictionary> | ||
</Application.Resources> | ||
</Application> |
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,12 @@ | ||
namespace SampleDemo | ||
{ | ||
public partial class App : Application | ||
{ | ||
public App() | ||
{ | ||
InitializeComponent(); | ||
|
||
MainPage = new AppShell(); | ||
} | ||
} | ||
} |
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,12 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<Shell | ||
x:Class="SampleDemo.AppShell" | ||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:local="clr-namespace:SampleDemo" | ||
Shell.FlyoutBehavior="Disabled"> | ||
|
||
<ShellContent ContentTemplate="{DataTemplate local:MainPage}" | ||
Route="MainPage" /> | ||
|
||
</Shell> |
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,10 @@ | ||
namespace SampleDemo | ||
{ | ||
public partial class AppShell : Shell | ||
{ | ||
public AppShell() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
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,118 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:chart="clr-namespace:Syncfusion.Maui.Charts;assembly=Syncfusion.Maui.Charts" | ||
xmlns:model="clr-namespace:SampleDemo" | ||
x:Class="SampleDemo.MainPage"> | ||
|
||
<ContentPage.BindingContext> | ||
<model:ViewModel></model:ViewModel> | ||
</ContentPage.BindingContext> | ||
|
||
<ContentPage.Content> | ||
|
||
<Border StrokeShape="RoundRectangle 20" | ||
StrokeThickness="4" | ||
Stroke="Gray" | ||
Margin="20"> | ||
|
||
<Grid RowDefinitions="50,*" | ||
RowSpacing="0"> | ||
|
||
<Grid Grid.Row="0" | ||
ColumnDefinitions="50,*" RowDefinitions="50,*"> | ||
<Image Grid.RowSpan="1" Grid.Column="0" Source="tank.png" | ||
HeightRequest="40" | ||
WidthRequest="40" | ||
Margin="8"/> | ||
<VerticalStackLayout Grid.Row="0" | ||
Grid.Column="1"> | ||
<Label Text="Comparison of Petrol and Diesel Prices in the UK" | ||
TextColor="Black" | ||
FontSize="18" | ||
FontFamily="TimeSpan" | ||
FontAttributes="Bold" | ||
Margin="0,5,0,0"/> | ||
|
||
<Label Text="Annual trends in ULSP and ULSD fuel prices in the UK, presented in pence per litre" | ||
TextColor="Black" | ||
FontSize="12" | ||
FontFamily="TimeSpan" | ||
Margin="5"/> | ||
</VerticalStackLayout> | ||
</Grid> | ||
|
||
<chart:SfCartesianChart Grid.Row="1" Grid.Column="0" | ||
IsTransposed="True" | ||
EnableSideBySideSeriesPlacement="False" | ||
Margin="0,5,0,0"> | ||
|
||
<chart:SfCartesianChart.Legend> | ||
<chart:ChartLegend /> | ||
</chart:SfCartesianChart.Legend> | ||
|
||
<chart:SfCartesianChart.XAxes> | ||
<chart:DateTimeAxis Interval="1" | ||
ShowMajorGridLines="False" | ||
IntervalType="Years"> | ||
</chart:DateTimeAxis> | ||
</chart:SfCartesianChart.XAxes> | ||
|
||
<chart:SfCartesianChart.YAxes> | ||
<chart:NumericalAxis ShowMajorGridLines="False" | ||
RangePadding="Additional"> | ||
<chart:NumericalAxis.LabelStyle> | ||
<chart:ChartAxisLabelStyle LabelFormat="0;#.##"/> | ||
</chart:NumericalAxis.LabelStyle> | ||
</chart:NumericalAxis> | ||
</chart:SfCartesianChart.YAxes> | ||
|
||
<!--Petrol Price Series--> | ||
<chart:ColumnSeries ItemsSource="{Binding FuelsPriceDetails}" | ||
XBindingPath="Date" | ||
YBindingPath="NegativePetrolPrice" | ||
ShowDataLabels="True" | ||
Label="Petrol" | ||
Fill="#4F709C" | ||
LegendIcon="Rectangle"> | ||
<chart:ColumnSeries.DataLabelSettings> | ||
<chart:CartesianDataLabelSettings LabelPlacement="Inner" | ||
BarAlignment="Bottom" | ||
UseSeriesPalette="False"> | ||
<chart:CartesianDataLabelSettings.LabelStyle> | ||
<chart:ChartDataLabelStyle FontSize="13" | ||
TextColor="White" | ||
LabelFormat="0;#.##"/> | ||
</chart:CartesianDataLabelSettings.LabelStyle> | ||
</chart:CartesianDataLabelSettings> | ||
</chart:ColumnSeries.DataLabelSettings> | ||
</chart:ColumnSeries> | ||
|
||
<!--Diesel Price Series--> | ||
<chart:ColumnSeries ItemsSource="{Binding FuelsPriceDetails}" | ||
XBindingPath="Date" | ||
YBindingPath="DieselPrice" | ||
Label="Diesel" | ||
ShowDataLabels="True" | ||
Fill="#7aa178" | ||
LegendIcon="Rectangle"> | ||
<chart:ColumnSeries.DataLabelSettings> | ||
<chart:CartesianDataLabelSettings LabelPlacement="Inner" | ||
UseSeriesPalette="False" | ||
BarAlignment="Bottom"> | ||
<chart:CartesianDataLabelSettings.LabelStyle> | ||
<chart:ChartDataLabelStyle FontSize="13" | ||
TextColor="White"/> | ||
</chart:CartesianDataLabelSettings.LabelStyle> | ||
</chart:CartesianDataLabelSettings> | ||
</chart:ColumnSeries.DataLabelSettings> | ||
</chart:ColumnSeries> | ||
</chart:SfCartesianChart> | ||
</Grid> | ||
</Border> | ||
</ContentPage.Content> | ||
|
||
</ContentPage> | ||
|
||
|
||
|
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 @@ | ||
using Syncfusion.Maui.Charts; | ||
using System.Collections.ObjectModel; | ||
|
||
namespace SampleDemo | ||
{ | ||
public partial class MainPage : ContentPage | ||
{ | ||
public MainPage() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
} | ||
} |
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,27 @@ | ||
using Microsoft.Extensions.Logging; | ||
using Syncfusion.Maui.Core.Hosting; | ||
|
||
namespace SampleDemo | ||
{ | ||
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"); | ||
}); | ||
|
||
#if DEBUG | ||
builder.Logging.AddDebug(); | ||
#endif | ||
|
||
return builder.Build(); | ||
} | ||
} | ||
} |
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,23 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace SampleDemo | ||
{ | ||
public class Model | ||
{ | ||
public DateTime Date { get; set; } | ||
public double NegativePetrolPrice { get; set; } | ||
public double DieselPrice { get; set; } | ||
|
||
public Model(DateTime date, double petrolPrice, double dieselPrice) | ||
{ | ||
Date = date; | ||
NegativePetrolPrice = -petrolPrice; | ||
DieselPrice = dieselPrice; | ||
} | ||
|
||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
ComparisonOfFuelsPrice/SampleDemo/Platforms/Android/AndroidManifest.xml
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,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
</manifest> |
11 changes: 11 additions & 0 deletions
11
ComparisonOfFuelsPrice/SampleDemo/Platforms/Android/MainActivity.cs
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,11 @@ | ||
using Android.App; | ||
using Android.Content.PM; | ||
using Android.OS; | ||
|
||
namespace SampleDemo | ||
{ | ||
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)] | ||
public class MainActivity : MauiAppCompatActivity | ||
{ | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
ComparisonOfFuelsPrice/SampleDemo/Platforms/Android/MainApplication.cs
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,16 @@ | ||
using Android.App; | ||
using Android.Runtime; | ||
|
||
namespace SampleDemo | ||
{ | ||
[Application] | ||
public class MainApplication : MauiApplication | ||
{ | ||
public MainApplication(IntPtr handle, JniHandleOwnership ownership) | ||
: base(handle, ownership) | ||
{ | ||
} | ||
|
||
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
ComparisonOfFuelsPrice/SampleDemo/Platforms/Android/Resources/values/colors.xml
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,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<color name="colorPrimary">#512BD4</color> | ||
<color name="colorPrimaryDark">#2B0B98</color> | ||
<color name="colorAccent">#2B0B98</color> | ||
</resources> |
10 changes: 10 additions & 0 deletions
10
ComparisonOfFuelsPrice/SampleDemo/Platforms/MacCatalyst/AppDelegate.cs
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,10 @@ | ||
using Foundation; | ||
|
||
namespace SampleDemo | ||
{ | ||
[Register("AppDelegate")] | ||
public class AppDelegate : MauiUIApplicationDelegate | ||
{ | ||
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
ComparisonOfFuelsPrice/SampleDemo/Platforms/MacCatalyst/Info.plist
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,30 @@ | ||
<?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"> | ||
<dict> | ||
<key>UIDeviceFamily</key> | ||
<array> | ||
<integer>1</integer> | ||
<integer>2</integer> | ||
</array> | ||
<key>UIRequiredDeviceCapabilities</key> | ||
<array> | ||
<string>arm64</string> | ||
</array> | ||
<key>UISupportedInterfaceOrientations</key> | ||
<array> | ||
<string>UIInterfaceOrientationPortrait</string> | ||
<string>UIInterfaceOrientationLandscapeLeft</string> | ||
<string>UIInterfaceOrientationLandscapeRight</string> | ||
</array> | ||
<key>UISupportedInterfaceOrientations~ipad</key> | ||
<array> | ||
<string>UIInterfaceOrientationPortrait</string> | ||
<string>UIInterfaceOrientationPortraitUpsideDown</string> | ||
<string>UIInterfaceOrientationLandscapeLeft</string> | ||
<string>UIInterfaceOrientationLandscapeRight</string> | ||
</array> | ||
<key>XSAppIconAssets</key> | ||
<string>Assets.xcassets/appicon.appiconset</string> | ||
</dict> | ||
</plist> |
16 changes: 16 additions & 0 deletions
16
ComparisonOfFuelsPrice/SampleDemo/Platforms/MacCatalyst/Program.cs
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,16 @@ | ||
using ObjCRuntime; | ||
using UIKit; | ||
|
||
namespace SampleDemo | ||
{ | ||
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)); | ||
} | ||
} | ||
} |
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,17 @@ | ||
using Microsoft.Maui; | ||
using Microsoft.Maui.Hosting; | ||
using System; | ||
|
||
namespace SampleDemo | ||
{ | ||
internal class Program : MauiApplication | ||
{ | ||
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); | ||
|
||
static void Main(string[] args) | ||
{ | ||
var app = new Program(); | ||
app.Run(args); | ||
} | ||
} | ||
} |
Oops, something went wrong.