diff --git a/OilGasExtraction/App.xaml b/OilGasExtraction/App.xaml new file mode 100644 index 0000000..98e8759 --- /dev/null +++ b/OilGasExtraction/App.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/OilGasExtraction/App.xaml.cs b/OilGasExtraction/App.xaml.cs new file mode 100644 index 0000000..d57fbb8 --- /dev/null +++ b/OilGasExtraction/App.xaml.cs @@ -0,0 +1,12 @@ +namespace OilGasExtraction +{ + public partial class App : Application + { + public App() + { + InitializeComponent(); + + MainPage = new MainPage(); + } + } +} diff --git a/OilGasExtraction/AppShell.xaml b/OilGasExtraction/AppShell.xaml new file mode 100644 index 0000000..4a4b9da --- /dev/null +++ b/OilGasExtraction/AppShell.xaml @@ -0,0 +1,15 @@ + + + + + + diff --git a/OilGasExtraction/AppShell.xaml.cs b/OilGasExtraction/AppShell.xaml.cs new file mode 100644 index 0000000..153d72e --- /dev/null +++ b/OilGasExtraction/AppShell.xaml.cs @@ -0,0 +1,10 @@ +namespace OilGasExtraction +{ + public partial class AppShell : Shell + { + public AppShell() + { + InitializeComponent(); + } + } +} diff --git a/OilGasExtraction/Converter/Converter.cs b/OilGasExtraction/Converter/Converter.cs new file mode 100644 index 0000000..fdca923 --- /dev/null +++ b/OilGasExtraction/Converter/Converter.cs @@ -0,0 +1,23 @@ +using System.Globalization; + +namespace OilGasExtraction +{ + public class Converter : IValueConverter + { + public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) + { + if (value is double) + { + double val = double.Parse(value.ToString()) / 1000; + + return " " + val.ToString() + "K"; + } + return null; + } + + public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/OilGasExtraction/MainPage.xaml b/OilGasExtraction/MainPage.xaml new file mode 100644 index 0000000..d033e2e --- /dev/null +++ b/OilGasExtraction/MainPage.xaml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OilGasExtraction/MainPage.xaml.cs b/OilGasExtraction/MainPage.xaml.cs new file mode 100644 index 0000000..e34814b --- /dev/null +++ b/OilGasExtraction/MainPage.xaml.cs @@ -0,0 +1,11 @@ +namespace OilGasExtraction +{ + public partial class MainPage : ContentPage + { + public MainPage() + { + InitializeComponent(); + } + + } +} diff --git a/OilGasExtraction/MauiProgram.cs b/OilGasExtraction/MauiProgram.cs new file mode 100644 index 0000000..1d45100 --- /dev/null +++ b/OilGasExtraction/MauiProgram.cs @@ -0,0 +1,27 @@ +using Microsoft.Extensions.Logging; +using Syncfusion.Maui.Core.Hosting; + +namespace OilGasExtraction +{ + public static class MauiProgram + { + public static MauiApp CreateMauiApp() + { + var builder = MauiApp.CreateBuilder(); + builder + .UseMauiApp() + .ConfigureSyncfusionCore() + .ConfigureFonts(fonts => + { + fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); + fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); + }); + +#if DEBUG + builder.Logging.AddDebug(); +#endif + + return builder.Build(); + } + } +} diff --git a/OilGasExtraction/Model/OilGasEmploymentModel.cs b/OilGasExtraction/Model/OilGasEmploymentModel.cs new file mode 100644 index 0000000..9106c61 --- /dev/null +++ b/OilGasExtraction/Model/OilGasEmploymentModel.cs @@ -0,0 +1,21 @@ +using Microsoft.Maui.Controls.Shapes; + +namespace OilGasExtraction +{ + public class OilGasEmploymentModel + { + public OilGasEmploymentModel(DateTime month, double employmentCount, double employmentGrowth) + { + Month = month; + EmploymentPercent = employmentCount; + EmploymentCount = employmentGrowth; + } + + public DateTime Month { get; set; } + public double EmploymentPercent { get; set; } + public double EmploymentCount { get; set; } + public Geometry? Path { get; set; } + public Brush FillPath { get; set; } + } + +} diff --git a/OilGasExtraction/OilGasExtraction.csproj b/OilGasExtraction/OilGasExtraction.csproj new file mode 100644 index 0000000..7f7ad39 --- /dev/null +++ b/OilGasExtraction/OilGasExtraction.csproj @@ -0,0 +1,79 @@ + + + + net8.0-android;net8.0-ios;net8.0-maccatalyst + $(TargetFrameworks);net8.0-windows10.0.19041.0 + + + + + + + Exe + OilGasExtraction + true + true + enable + enable + + + OilGasExtraction + + + com.companyname.oilgasextraction + + + 1.0 + 1 + + 11.0 + 13.1 + 21.0 + 10.0.17763.0 + 10.0.17763.0 + 6.5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OilGasExtraction/OilGasExtraction.csproj.user b/OilGasExtraction/OilGasExtraction.csproj.user new file mode 100644 index 0000000..70f9d49 --- /dev/null +++ b/OilGasExtraction/OilGasExtraction.csproj.user @@ -0,0 +1,36 @@ + + + + False + net8.0-windows10.0.19041.0 + Windows Machine + Emulator + pixel_5_-_api_34 + + + ProjectDebugger + + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + \ No newline at end of file diff --git a/OilGasExtraction/OilGasExtraction.sln b/OilGasExtraction/OilGasExtraction.sln new file mode 100644 index 0000000..a6d6b9a --- /dev/null +++ b/OilGasExtraction/OilGasExtraction.sln @@ -0,0 +1,27 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34219.65 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OilGasExtraction", "OilGasExtraction.csproj", "{36CB1837-EB76-46E9-8E0C-44822DE00386}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {36CB1837-EB76-46E9-8E0C-44822DE00386}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {36CB1837-EB76-46E9-8E0C-44822DE00386}.Debug|Any CPU.Build.0 = Debug|Any CPU + {36CB1837-EB76-46E9-8E0C-44822DE00386}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {36CB1837-EB76-46E9-8E0C-44822DE00386}.Release|Any CPU.ActiveCfg = Release|Any CPU + {36CB1837-EB76-46E9-8E0C-44822DE00386}.Release|Any CPU.Build.0 = Release|Any CPU + {36CB1837-EB76-46E9-8E0C-44822DE00386}.Release|Any CPU.Deploy.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B19C383B-1563-4B5D-A333-6A6148BB13C1} + EndGlobalSection +EndGlobal diff --git a/OilGasExtraction/Platforms/Android/AndroidManifest.xml b/OilGasExtraction/Platforms/Android/AndroidManifest.xml new file mode 100644 index 0000000..e9937ad --- /dev/null +++ b/OilGasExtraction/Platforms/Android/AndroidManifest.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/OilGasExtraction/Platforms/Android/MainActivity.cs b/OilGasExtraction/Platforms/Android/MainActivity.cs new file mode 100644 index 0000000..a533e1e --- /dev/null +++ b/OilGasExtraction/Platforms/Android/MainActivity.cs @@ -0,0 +1,11 @@ +using Android.App; +using Android.Content.PM; +using Android.OS; + +namespace OilGasExtraction +{ + [Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ScreenOrientation = ScreenOrientation.Landscape, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)] + public class MainActivity : MauiAppCompatActivity + { + } +} diff --git a/OilGasExtraction/Platforms/Android/MainApplication.cs b/OilGasExtraction/Platforms/Android/MainApplication.cs new file mode 100644 index 0000000..648d1c0 --- /dev/null +++ b/OilGasExtraction/Platforms/Android/MainApplication.cs @@ -0,0 +1,16 @@ +using Android.App; +using Android.Runtime; + +namespace OilGasExtraction +{ + [Application] + public class MainApplication : MauiApplication + { + public MainApplication(IntPtr handle, JniHandleOwnership ownership) + : base(handle, ownership) + { + } + + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + } +} diff --git a/OilGasExtraction/Platforms/Android/Resources/values/colors.xml b/OilGasExtraction/Platforms/Android/Resources/values/colors.xml new file mode 100644 index 0000000..c04d749 --- /dev/null +++ b/OilGasExtraction/Platforms/Android/Resources/values/colors.xml @@ -0,0 +1,6 @@ + + + #512BD4 + #2B0B98 + #2B0B98 + \ No newline at end of file diff --git a/OilGasExtraction/Platforms/MacCatalyst/AppDelegate.cs b/OilGasExtraction/Platforms/MacCatalyst/AppDelegate.cs new file mode 100644 index 0000000..bebd64b --- /dev/null +++ b/OilGasExtraction/Platforms/MacCatalyst/AppDelegate.cs @@ -0,0 +1,10 @@ +using Foundation; + +namespace OilGasExtraction +{ + [Register("AppDelegate")] + public class AppDelegate : MauiUIApplicationDelegate + { + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + } +} diff --git a/OilGasExtraction/Platforms/MacCatalyst/Entitlements.plist b/OilGasExtraction/Platforms/MacCatalyst/Entitlements.plist new file mode 100644 index 0000000..de4adc9 --- /dev/null +++ b/OilGasExtraction/Platforms/MacCatalyst/Entitlements.plist @@ -0,0 +1,14 @@ + + + + + + + com.apple.security.app-sandbox + + + com.apple.security.network.client + + + + diff --git a/OilGasExtraction/Platforms/MacCatalyst/Info.plist b/OilGasExtraction/Platforms/MacCatalyst/Info.plist new file mode 100644 index 0000000..7268977 --- /dev/null +++ b/OilGasExtraction/Platforms/MacCatalyst/Info.plist @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + UIDeviceFamily + + 2 + + UIRequiredDeviceCapabilities + + arm64 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + XSAppIconAssets + Assets.xcassets/appicon.appiconset + + diff --git a/OilGasExtraction/Platforms/MacCatalyst/Program.cs b/OilGasExtraction/Platforms/MacCatalyst/Program.cs new file mode 100644 index 0000000..693febc --- /dev/null +++ b/OilGasExtraction/Platforms/MacCatalyst/Program.cs @@ -0,0 +1,16 @@ +using ObjCRuntime; +using UIKit; + +namespace OilGasExtraction +{ + 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)); + } + } +} diff --git a/OilGasExtraction/Platforms/Tizen/Main.cs b/OilGasExtraction/Platforms/Tizen/Main.cs new file mode 100644 index 0000000..c3864af --- /dev/null +++ b/OilGasExtraction/Platforms/Tizen/Main.cs @@ -0,0 +1,17 @@ +using Microsoft.Maui; +using Microsoft.Maui.Hosting; +using System; + +namespace OilGasExtraction +{ + internal class Program : MauiApplication + { + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + + static void Main(string[] args) + { + var app = new Program(); + app.Run(args); + } + } +} diff --git a/OilGasExtraction/Platforms/Tizen/tizen-manifest.xml b/OilGasExtraction/Platforms/Tizen/tizen-manifest.xml new file mode 100644 index 0000000..1604df5 --- /dev/null +++ b/OilGasExtraction/Platforms/Tizen/tizen-manifest.xml @@ -0,0 +1,15 @@ + + + + + + maui-appicon-placeholder + + + + + http://tizen.org/privilege/internet + + + + \ No newline at end of file diff --git a/OilGasExtraction/Platforms/Windows/App.xaml b/OilGasExtraction/Platforms/Windows/App.xaml new file mode 100644 index 0000000..4acc21e --- /dev/null +++ b/OilGasExtraction/Platforms/Windows/App.xaml @@ -0,0 +1,8 @@ + + + diff --git a/OilGasExtraction/Platforms/Windows/App.xaml.cs b/OilGasExtraction/Platforms/Windows/App.xaml.cs new file mode 100644 index 0000000..27af856 --- /dev/null +++ b/OilGasExtraction/Platforms/Windows/App.xaml.cs @@ -0,0 +1,25 @@ +using Microsoft.UI.Xaml; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace OilGasExtraction.WinUI +{ + /// + /// Provides application-specific behavior to supplement the default Application class. + /// + public partial class App : MauiWinUIApplication + { + /// + /// Initializes the singleton application object. This is the first line of authored code + /// executed, and as such is the logical equivalent of main() or WinMain(). + /// + public App() + { + this.InitializeComponent(); + } + + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + } + +} diff --git a/OilGasExtraction/Platforms/Windows/Package.appxmanifest b/OilGasExtraction/Platforms/Windows/Package.appxmanifest new file mode 100644 index 0000000..e75b435 --- /dev/null +++ b/OilGasExtraction/Platforms/Windows/Package.appxmanifest @@ -0,0 +1,46 @@ + + + + + + + + + $placeholder$ + User Name + $placeholder$.png + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OilGasExtraction/Platforms/Windows/app.manifest b/OilGasExtraction/Platforms/Windows/app.manifest new file mode 100644 index 0000000..373670b --- /dev/null +++ b/OilGasExtraction/Platforms/Windows/app.manifest @@ -0,0 +1,15 @@ + + + + + + + + true/PM + PerMonitorV2, PerMonitor + + + diff --git a/OilGasExtraction/Platforms/iOS/AppDelegate.cs b/OilGasExtraction/Platforms/iOS/AppDelegate.cs new file mode 100644 index 0000000..bebd64b --- /dev/null +++ b/OilGasExtraction/Platforms/iOS/AppDelegate.cs @@ -0,0 +1,10 @@ +using Foundation; + +namespace OilGasExtraction +{ + [Register("AppDelegate")] + public class AppDelegate : MauiUIApplicationDelegate + { + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + } +} diff --git a/OilGasExtraction/Platforms/iOS/Info.plist b/OilGasExtraction/Platforms/iOS/Info.plist new file mode 100644 index 0000000..0004a4f --- /dev/null +++ b/OilGasExtraction/Platforms/iOS/Info.plist @@ -0,0 +1,32 @@ + + + + + LSRequiresIPhoneOS + + UIDeviceFamily + + 1 + 2 + + UIRequiredDeviceCapabilities + + arm64 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + XSAppIconAssets + Assets.xcassets/appicon.appiconset + + diff --git a/OilGasExtraction/Platforms/iOS/Program.cs b/OilGasExtraction/Platforms/iOS/Program.cs new file mode 100644 index 0000000..693febc --- /dev/null +++ b/OilGasExtraction/Platforms/iOS/Program.cs @@ -0,0 +1,16 @@ +using ObjCRuntime; +using UIKit; + +namespace OilGasExtraction +{ + 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)); + } + } +} diff --git a/OilGasExtraction/Properties/launchSettings.json b/OilGasExtraction/Properties/launchSettings.json new file mode 100644 index 0000000..edf8aad --- /dev/null +++ b/OilGasExtraction/Properties/launchSettings.json @@ -0,0 +1,8 @@ +{ + "profiles": { + "Windows Machine": { + "commandName": "MsixPackage", + "nativeDebugging": false + } + } +} \ No newline at end of file diff --git a/OilGasExtraction/Resources/AppIcon/appicon.svg b/OilGasExtraction/Resources/AppIcon/appicon.svg new file mode 100644 index 0000000..9d63b65 --- /dev/null +++ b/OilGasExtraction/Resources/AppIcon/appicon.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/OilGasExtraction/Resources/AppIcon/appiconfg.svg b/OilGasExtraction/Resources/AppIcon/appiconfg.svg new file mode 100644 index 0000000..21dfb25 --- /dev/null +++ b/OilGasExtraction/Resources/AppIcon/appiconfg.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/OilGasExtraction/Resources/Fonts/OpenSans-Regular.ttf b/OilGasExtraction/Resources/Fonts/OpenSans-Regular.ttf new file mode 100644 index 0000000..9ab655d Binary files /dev/null and b/OilGasExtraction/Resources/Fonts/OpenSans-Regular.ttf differ diff --git a/OilGasExtraction/Resources/Fonts/OpenSans-Semibold.ttf b/OilGasExtraction/Resources/Fonts/OpenSans-Semibold.ttf new file mode 100644 index 0000000..2b7468e Binary files /dev/null and b/OilGasExtraction/Resources/Fonts/OpenSans-Semibold.ttf differ diff --git a/OilGasExtraction/Resources/Fonts/SB Icons.ttf b/OilGasExtraction/Resources/Fonts/SB Icons.ttf new file mode 100644 index 0000000..78e2f68 Binary files /dev/null and b/OilGasExtraction/Resources/Fonts/SB Icons.ttf differ diff --git a/OilGasExtraction/Resources/Images/dotnet_bot.png b/OilGasExtraction/Resources/Images/dotnet_bot.png new file mode 100644 index 0000000..f93ce02 Binary files /dev/null and b/OilGasExtraction/Resources/Images/dotnet_bot.png differ diff --git a/OilGasExtraction/Resources/Images/growth.png b/OilGasExtraction/Resources/Images/growth.png new file mode 100644 index 0000000..1431a3d Binary files /dev/null and b/OilGasExtraction/Resources/Images/growth.png differ diff --git a/OilGasExtraction/Resources/Raw/AboutAssets.txt b/OilGasExtraction/Resources/Raw/AboutAssets.txt new file mode 100644 index 0000000..15d6244 --- /dev/null +++ b/OilGasExtraction/Resources/Raw/AboutAssets.txt @@ -0,0 +1,15 @@ +Any raw assets you want to be deployed with your application can be placed in +this directory (and child directories). Deployment of the asset to your application +is automatically handled by the following `MauiAsset` Build Action within your `.csproj`. + + + +These files will be deployed with you package and will be accessible using Essentials: + + async Task LoadMauiAsset() + { + using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt"); + using var reader = new StreamReader(stream); + + var contents = reader.ReadToEnd(); + } diff --git a/OilGasExtraction/Resources/Raw/data.csv b/OilGasExtraction/Resources/Raw/data.csv new file mode 100644 index 0000000..f8fa596 --- /dev/null +++ b/OilGasExtraction/Resources/Raw/data.csv @@ -0,0 +1,182 @@ +1/1/2008,7.976878613,93400 +2/1/2008,8.986175115,94600 +3/1/2008,9.436133487,95100 +4/1/2008,10.28571429,96500 +5/1/2008,9.491525424,96900 +6/1/2008,9.602649007,99300 +7/1/2008,9.051254089,100000 +8/1/2008,8.775731311,100400 +9/1/2008,8.615049073,99600 +10/1/2008,8.855291577,100800 +11/1/2008,8.467309753,101200 +12/1/2008,8.067940552,101800 +1/1/2009,7.3875803,100300 +2/1/2009,5.708245243,100000 +3/1/2009,4.626708728,99500 +4/1/2009,2.279792746,98700 +5/1/2009,1.135190918,98000 +6/1/2009,-0.604229607,98700 +7/1/2009,-0.2,99800 +8/1/2009,-1.195219124,99200 +9/1/2009,-1.506024096,98100 +10/1/2009,-2.876984127,97900 +11/1/2009,-3.162055336,98000 +12/1/2009,-3.241650295,98500 +1/1/2010,-1.595214357,98700 +2/1/2010,-1.3,98700 +3/1/2010,-0.40201005,99100 +4/1/2010,0,98700 +5/1/2010,1.224489796,99200 +6/1/2010,1.925025329,100600 +7/1/2010,1.603206413,101400 +8/1/2010,2.419354839,101600 +9/1/2010,3.058103976,101100 +10/1/2010,3.881511747,101700 +11/1/2010,4.183673469,102100 +12/1/2010,4.467005076,102900 +1/1/2011,4.356636272,103000 +2/1/2011,4.457953394,103100 +3/1/2011,4.439959637,103500 +4/1/2011,5.977710233,104600 +5/1/2011,5.040322581,104200 +6/1/2011,6.461232604,107100 +7/1/2011,6.903353057,108400 +8/1/2011,7.775590551,109500 +9/1/2011,7.220573689,108400 +10/1/2011,8.456243854,110300 +11/1/2011,8.912830558,111200 +12/1/2011,9.426627794,112600 +1/1/2012,9.611650485,112900 +2/1/2012,10.28128031,113700 +3/1/2012,10.62801932,114500 +4/1/2012,9.751434034,114800 +5/1/2012,9.788867562,114400 +6/1/2012,8.776844071,116500 +7/1/2012,8.671586716,117800 +8/1/2012,7.853881279,118100 +9/1/2012,7.933579336,117000 +10/1/2012,6.346328196,117300 +11/1/2012,6.474820144,118400 +12/1/2012,5.95026643,119300 +1/1/2013,5.225863596,118800 +2/1/2013,5.277044855,119700 +3/1/2013,4.716157205,119900 +4/1/2013,4.965156794,120500 +5/1/2013,5.769230769,121000 +6/1/2013,5.407725322,122800 +7/1/2013,5.687606112,124500 +8/1/2013,5.249788315,124300 +9/1/2013,4.957264957,122800 +10/1/2013,5.285592498,123500 +11/1/2013,4.222972973,123400 +12/1/2013,3.85582565,123900 +1/1/2014,3.872053872,123400 +2/1/2014,3.091060986,123400 +3/1/2014,2.668890742,123100 +4/1/2014,2.738589212,123800 +5/1/2014,2.809917355,124400 +6/1/2014,2.361563518,125700 +7/1/2014,2.088353414,127100 +8/1/2014,1.93081255,126700 +9/1/2014,1.465798046,124600 +10/1/2014,1.457489879,125300 +11/1/2014,1.296596434,125000 +12/1/2014,0.807102502,124900 +1/1/2015,0.243111831,123700 +2/1/2015,-1.782820097,121200 +3/1/2015,-2.924451665,119500 +4/1/2015,-3.554119548,119400 +5/1/2015,-4.501607717,118800 +6/1/2015,-4.852824185,119600 +7/1/2015,-6.687647522,118600 +8/1/2015,-7.024467245,117800 +9/1/2015,-7.704654896,115000 +10/1/2015,-8.778930567,114300 +11/1/2015,-10,112500 +12/1/2015,-10.32826261,112000 +1/1/2016,-13.5004042,107000 +2/1/2016,-12.95379538,105500 +3/1/2016,-12.80334728,104200 +4/1/2016,-15.07537688,101400 +5/1/2016,-16.16161616,99600 +6/1/2016,-17.05685619,99200 +7/1/2016,-17.28499157,98100 +8/1/2016,-18.08149406,96500 +9/1/2016,-18.26086957,94000 +10/1/2016,-17.49781277,94300 +11/1/2016,-17.86666667,92400 +12/1/2016,-17.58928571,92300 +1/1/2017,-14.29906542,91700 +2/1/2017,-13.83886256,90900 +3/1/2017,-13.53166987,90100 +4/1/2017,-11.43984221,89800 +5/1/2017,-9.939759036,89700 +6/1/2017,-8.568548387,90700 +7/1/2017,-7.951070336,90300 +8/1/2017,-6.528497409,90200 +9/1/2017,-5.531914894,88800 +10/1/2017,-4.87804878,89700 +11/1/2017,-3.03030303,89600 +12/1/2017,-2.491874323,90000 +1/1/2018,-3.162486369,88800 +2/1/2018,-2.200220022,88900 +3/1/2018,-1.220865705,89000 +4/1/2018,-1.44766147,88500 +5/1/2018,-1.003344482,88800 +6/1/2018,-0.882028666,89900 +7/1/2018,-0.221483942,90100 +8/1/2018,0.110864745,90300 +9/1/2018,0.563063063,89300 +10/1/2018,-0.22296544,89500 +11/1/2018,0.223214286,89800 +12/1/2018,0,90000 +1/1/2019,0.563063063,89300 +2/1/2019,0.674915636,89500 +3/1/2019,0.449438202,89400 +4/1/2019,1.129943503,89500 +5/1/2019,0.675675676,89400 +6/1/2019,0,89900 +7/1/2019,0.110987791,90200 +8/1/2019,-0.332225914,90000 +9/1/2019,-0.559910414,88800 +10/1/2019,-1.56424581,88100 +11/1/2019,-2.561247216,87500 +12/1/2019,-3.333333333,87000 +1/1/2020,-3.13549832,86500 +2/1/2020,-3.463687151,86400 +3/1/2020,-4.138702461,85700 +4/1/2020,-7.039106145,83200 +5/1/2020,-9.507829978,80900 +6/1/2020,-11.12347052,79900 +7/1/2020,-12.19512195,79200 +8/1/2020,-12.88888889,78400 +9/1/2020,-12.83783784,77400 +10/1/2020,-12.71282633,76900 +11/1/2020,-13.37142857,75800 +12/1/2020,-13.2183908,75500 +1/1/2021,-13.98843931,74400 +2/1/2021,-15.39351852,73100 +3/1/2021,-16.33605601,71700 +4/1/2021,-13.70192308,71800 +5/1/2021,-11.37206428,71700 +6/1/2021,-10.51314143,71500 +7/1/2021,-9.090909091,72000 +8/1/2021,-8.545918367,71700 +9/1/2021,-7.881136951,71300 +10/1/2021,-7.022106632,71500 +11/1/2021,-5.672823219,71500 +12/1/2021,-5.033112583,71700 +1/1/2022,-4.435483871,71100 +2/1/2022,-2.325581395,71400 +3/1/2022,-0.418410042,71400 +4/1/2022,-1.114206128,71000 +5/1/2022,-1.115760112,70900 +6/1/2022,-0.559440559,71100 +7/1/2022,-0.138888889,71900 +8/1/2022,0.557880056,72100 +9/1/2022,0.561009818,71700 +10/1/2022,0.839160839,72100 +11/1/2022,0.839160839,72100 +12/1/2022,1.255230126,72600 +1/1/2023,2.109704641,72600 +2/1/2023,0.980392157,72100 diff --git a/OilGasExtraction/Resources/Splash/splash.svg b/OilGasExtraction/Resources/Splash/splash.svg new file mode 100644 index 0000000..21dfb25 --- /dev/null +++ b/OilGasExtraction/Resources/Splash/splash.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/OilGasExtraction/Resources/Styles/Colors.xaml b/OilGasExtraction/Resources/Styles/Colors.xaml new file mode 100644 index 0000000..30307a5 --- /dev/null +++ b/OilGasExtraction/Resources/Styles/Colors.xaml @@ -0,0 +1,45 @@ + + + + + + + #512BD4 + #ac99ea + #242424 + #DFD8F7 + #9880e5 + #2B0B98 + + White + Black + #D600AA + #190649 + #1f1f1f + + #E1E1E1 + #C8C8C8 + #ACACAC + #919191 + #6E6E6E + #404040 + #212121 + #141414 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OilGasExtraction/Resources/Styles/Styles.xaml b/OilGasExtraction/Resources/Styles/Styles.xaml new file mode 100644 index 0000000..e0d36bb --- /dev/null +++ b/OilGasExtraction/Resources/Styles/Styles.xaml @@ -0,0 +1,426 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OilGasExtraction/ViewModel/OilGasEmploymentViewModel.cs b/OilGasExtraction/ViewModel/OilGasEmploymentViewModel.cs new file mode 100644 index 0000000..15f11e3 --- /dev/null +++ b/OilGasExtraction/ViewModel/OilGasEmploymentViewModel.cs @@ -0,0 +1,66 @@ +using Microsoft.Maui.Controls.Shapes; +using System.Collections.ObjectModel; +using System.Reflection; + +namespace OilGasExtraction +{ + public class OilGasEmploymentViewModel + { + public ObservableCollection EmploymentDetails { get; set; } + public ObservableCollection CustomBrushes { get; set; } + public double CrossesAt { get; set; } + public Geometry? Green { get; set; } = (Geometry?)(new PathGeometryConverter().ConvertFromInvariantString("M16.000016,0L24.000008,10.7 32,21.399999 16.000016,21.399999 0,21.399999 7.9999928,10.7z")); + public Geometry? Red { get; set; } = (Geometry?)(new PathGeometryConverter().ConvertFromInvariantString("M0.87499046,0L31.12499,0C31.92399,0,32.22299,0.49899435,31.82399,0.9979887L16.648991,21.064764C16.24999,21.563759,15.65099,21.563759,15.250991,21.064764L0.1759901,0.9979887C-0.22300911,0.49899435,0.075990677,0,0.87499046,0z")); + + public OilGasEmploymentViewModel() + { + + EmploymentDetails = new ObservableCollection(ReadCSV()); + + CustomBrushes = new ObservableCollection(); + + CrossesAt = new DateTime(2015, 06, 15).ToOADate(); + + foreach (var item in EmploymentDetails) + { + if (item.EmploymentPercent >= 0) + { + item.Path = Green; + item.FillPath = new SolidColorBrush(Color.FromHex("#619624")); + CustomBrushes.Add(new SolidColorBrush(Color.FromHex("#619624"))); + } + else if (item.EmploymentPercent < 0) + { + item.Path = Red; + item.FillPath = new SolidColorBrush(Color.FromHex("#eb6569")); + CustomBrushes.Add(new SolidColorBrush(Color.FromHex("#eb6569"))); + } + } + } + + private IEnumerable ReadCSV() + { + Assembly executingAssembly = typeof(App).GetTypeInfo().Assembly; + Stream inputStream = executingAssembly.GetManifestResourceStream("OilGasExtraction.Resources.Raw.data.csv"); + + string? line; + List lines = new List(); + + using StreamReader reader = new StreamReader(inputStream); + while ((line = reader.ReadLine()) != null) + { + lines.Add(line); + } + + lines[0].Remove(0); + return lines.Select(line => + { + string[] data = line.Split(','); + DateTime day = DateTime.Parse(data[0]); + + return new OilGasEmploymentModel(day, Convert.ToDouble(data[1]), Convert.ToDouble(data[2])); + + }); + } + } +} diff --git a/README.md b/README.md index 14cb048..4deac4e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,21 @@ -# Creating-a-Line-Chart-to-Analysis-the-Wage-Trends-in-Texas-Oil-Gas-Extraction-Industry -This sample demonstrates how to create a Line Chart to Analysis the Wage Trends in Texas Oil Gas Extraction Industry +# Creating a Line Chart to Analysis the Wage Trends in Texas Oil Gas Extraction Industry +This blog demonstrates the trend of employed individuals in the Texas Oil Gas Extraction Industry over the past fifteen years using a Syncfusion .NET MAUI Line Chart. + +Line chart is used to represent the data trends at equal intervals by connecting points on a plot with straight lines. Here, we have analyse percentage of employment growth or decline over the last fifteen years in the Texas Oil Gas Extraction Industry. + +## Customizing axis + +### Axis crossing + +The chart allows you to customize the origin, by default the axis will be rendered with (0,0) as the origin in x and y-axes. An axis can be positioned anywhere in the chart area by using the CrossesAt property. This property specifies where the horizontal axis intersects or crosses the vertical axis, and vice versa. + +The RenderNextToCrossingValue property is used to determine whether the crossing axis should be placed at crossing position or not. The default value of RenderNextToCrossingValue property is true. + +### Label format in Label styles +The LabelFormat property in the label style of a Syncfusion .NET MAUI chart axis allows you to customize the format of the labels displayed along the axis. You can use this property to specify how the values on the axis should be formatted, such as displaying them as currency, percentages, dates, or custom strings. + +### Display grid lines +The ShowMajorGridLines and ShowMinorGridLines properties control the visibility of the major and minor grid lines on the chart axis, respectively. When set to true, these properties display grid lines along the major and minor tick marks of the axis, providing visual reference points to help interpret the data plotted on the chart. When set to false, the grid lines are hidden. Adjusting these properties allows you to control the appearance of the grid lines based on your specific chart design and requirements + +### Output +![OutputImage](https://github.com/SyncfusionExamples/Creating-a-Line-Chart-to-Analysis-the-Wage-Trends-in-Texas-Oil-Gas-Extraction-Industry/assets/105482474/c8593c82-cbca-492b-9bdd-a621880c2017) \ No newline at end of file