Skip to content

Commit 1e4c669

Browse files
saiyathalifathimabee.m@syncfusion.comsaiyathalifathimabee.m@syncfusion.com
authored andcommitted
Added the sample
1 parent a6b3f4f commit 1e4c669

67 files changed

Lines changed: 1819 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.9.34728.123
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChartControlsThemeDemo", "ChartControlsThemeDemo\ChartControlsThemeDemo.csproj", "{E1F4CA58-BD7F-43BC-AF08-85E08874E554}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{E1F4CA58-BD7F-43BC-AF08-85E08874E554}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{E1F4CA58-BD7F-43BC-AF08-85E08874E554}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{E1F4CA58-BD7F-43BC-AF08-85E08874E554}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
17+
{E1F4CA58-BD7F-43BC-AF08-85E08874E554}.Release|Any CPU.ActiveCfg = Release|Any CPU
18+
{E1F4CA58-BD7F-43BC-AF08-85E08874E554}.Release|Any CPU.Build.0 = Release|Any CPU
19+
{E1F4CA58-BD7F-43BC-AF08-85E08874E554}.Release|Any CPU.Deploy.0 = Release|Any CPU
20+
EndGlobalSection
21+
GlobalSection(SolutionProperties) = preSolution
22+
HideSolutionNode = FALSE
23+
EndGlobalSection
24+
GlobalSection(ExtensibilityGlobals) = postSolution
25+
SolutionGuid = {A283A021-DDF3-4CA4-8924-587D376F02DB}
26+
EndGlobalSection
27+
EndGlobal
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version = "1.0" encoding = "UTF-8" ?>
2+
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
4+
xmlns:local="clr-namespace:ChartControlsThemeDemo"
5+
x:Class="ChartControlsThemeDemo.App">
6+
<Application.Resources>
7+
<ResourceDictionary>
8+
<ResourceDictionary.MergedDictionaries>
9+
<ResourceDictionary Source="Resources/Styles/Colors.xaml" />
10+
<ResourceDictionary Source="Resources/Styles/Styles.xaml" />
11+
</ResourceDictionary.MergedDictionaries>
12+
</ResourceDictionary>
13+
</Application.Resources>
14+
</Application>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
namespace ChartControlsThemeDemo
2+
{
3+
public partial class App : Application
4+
{
5+
public App()
6+
{
7+
InitializeComponent();
8+
9+
MainPage = new AppShell();
10+
}
11+
}
12+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<Shell
3+
x:Class="ChartControlsThemeDemo.AppShell"
4+
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
5+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
6+
xmlns:local="clr-namespace:ChartControlsThemeDemo"
7+
Shell.FlyoutBehavior="Flyout"
8+
Title="ChartControlsThemeDemo">
9+
10+
<ShellContent Title="Cartesian Chart" Route="page1"
11+
ContentTemplate="{DataTemplate local:CartesianChartDemo}" />
12+
<ShellContent Title="Circular Chart" Route="page2"
13+
ContentTemplate="{DataTemplate local:CircularChartDemo}" />
14+
<ShellContent Title="Funnel Chart" Route="page3"
15+
ContentTemplate="{DataTemplate local:FunnelChartDemo}" />
16+
<ShellContent Title="Pyramid Chart" Route="page4"
17+
ContentTemplate="{DataTemplate local:PyramidChartDemo}" />
18+
<ShellContent Title="Sunburst Chart" Route="page5"
19+
ContentTemplate="{DataTemplate local:SunburstChartDemo}" />
20+
21+
</Shell>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using Microsoft.Maui.Controls;
2+
3+
namespace ChartControlsThemeDemo
4+
{
5+
public partial class AppShell : Shell
6+
{
7+
public AppShell()
8+
{
9+
InitializeComponent();
10+
11+
Routing.RegisterRoute("page1", typeof(CartesianChartDemo));
12+
Routing.RegisterRoute("page2", typeof(CircularChartDemo));
13+
Routing.RegisterRoute("page3", typeof(FunnelChartDemo));
14+
Routing.RegisterRoute("page4", typeof(PyramidChartDemo));
15+
Routing.RegisterRoute("page5", typeof(SunburstChartDemo));
16+
}
17+
}
18+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
4+
x:Class="ChartControlsThemeDemo.CartesianChartDemo"
5+
xmlns:chart="clr-namespace:Syncfusion.Maui.Charts;assembly=Syncfusion.Maui.Charts"
6+
xmlns:local="clr-namespace:ChartControlsThemeDemo">
7+
8+
<ContentPage.BindingContext>
9+
<local:CartesianViewModel/>
10+
</ContentPage.BindingContext>
11+
12+
<chart:SfCartesianChart>
13+
14+
<chart:SfCartesianChart.Legend>
15+
<chart:ChartLegend ToggleSeriesVisibility="True"/>
16+
</chart:SfCartesianChart.Legend>
17+
18+
<chart:SfCartesianChart.Title>
19+
<Label Text="Inflation - Consumer Prices" Margin="0" HorizontalOptions="Fill" HorizontalTextAlignment="Center" VerticalOptions="Center" FontSize="16" />
20+
</chart:SfCartesianChart.Title>
21+
22+
<chart:SfCartesianChart.XAxes>
23+
<chart:CategoryAxis ShowMajorGridLines="false" Interval="2" PlotOffsetStart="10" PlotOffsetEnd="10" AxisLineOffset="10">
24+
<chart:CategoryAxis.MajorTickStyle>
25+
<chart:ChartAxisTickStyle TickSize="10">
26+
</chart:ChartAxisTickStyle>
27+
</chart:CategoryAxis.MajorTickStyle>
28+
</chart:CategoryAxis>
29+
30+
</chart:SfCartesianChart.XAxes>
31+
<chart:SfCartesianChart.YAxes>
32+
<chart:NumericalAxis Maximum="100" Minimum="0" Interval="20">
33+
<chart:NumericalAxis.LabelStyle>
34+
<chart:ChartAxisLabelStyle LabelFormat="0'%"/>
35+
</chart:NumericalAxis.LabelStyle>
36+
<chart:NumericalAxis.AxisLineStyle>
37+
<chart:ChartLineStyle StrokeWidth="0">
38+
</chart:ChartLineStyle>
39+
</chart:NumericalAxis.AxisLineStyle>
40+
<chart:NumericalAxis.MajorTickStyle>
41+
<chart:ChartAxisTickStyle TickSize="0" />
42+
</chart:NumericalAxis.MajorTickStyle>
43+
</chart:NumericalAxis>
44+
</chart:SfCartesianChart.YAxes>
45+
46+
<chart:SfCartesianChart.Series>
47+
<chart:LineSeries ItemsSource="{Binding LineData1}" XBindingPath="Year" YBindingPath="Value"
48+
Label="Germany" EnableTooltip="True" Fill="#314A6E"
49+
StrokeWidth="1" ShowMarkers="True" LegendIcon="SeriesType">
50+
<chart:LineSeries.MarkerSettings>
51+
<chart:ChartMarkerSettings Width="8" Height="8" Fill="White"
52+
Stroke="#314A6E" StrokeWidth="1"/>
53+
</chart:LineSeries.MarkerSettings>
54+
</chart:LineSeries>
55+
56+
<chart:LineSeries ItemsSource="{Binding LineData2}" XBindingPath="Year" YBindingPath="Value"
57+
Label="England" EnableTooltip="True" Fill="#48988B"
58+
StrokeWidth="1" ShowMarkers="True" LegendIcon="SeriesType">
59+
<chart:LineSeries.MarkerSettings>
60+
<chart:ChartMarkerSettings Width="8" Height="8" Fill="White"
61+
Stroke="#48988B" StrokeWidth="1"/>
62+
</chart:LineSeries.MarkerSettings>
63+
</chart:LineSeries>
64+
65+
</chart:SfCartesianChart.Series>
66+
</chart:SfCartesianChart>
67+
68+
</ContentPage>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace ChartControlsThemeDemo;
2+
3+
public partial class CartesianChartDemo : ContentPage
4+
{
5+
public CartesianChartDemo()
6+
{
7+
InitializeComponent();
8+
}
9+
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<ResourceDictionary xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
4+
xmlns:sys="clr-namespace:System;assembly=mscorlib"
5+
x:Class="ChartControlsThemeDemo.SfCartesianChartThemeKeys">
6+
7+
8+
<x:String x:Key="SfCartesianChartTheme">CommonTheme</x:String>
9+
10+
<Color x:Key="SfCartesianChartBackground"/>
11+
12+
<!--Grid Line, Axis Line, Tick Line-->
13+
<Color x:Key="SfCartesianChartMajorGridLineStroke"/>
14+
<Color x:Key="SfCartesianChartMinorGridLineStroke"/>
15+
<Color x:Key="SfCartesianChartMajorTickLineStroke"/>
16+
<Color x:Key="SfCartesianChartMinorTickLineStroke"/>
17+
<Color x:Key="SfCartesianChartAxisLineStroke"/>
18+
19+
<!--Axis Title-->
20+
<Color x:Key="SfCartesianChartAxisTitleTextColor"/>
21+
<Color x:Key="SfCartesianChartAxisTitleBackground"/>
22+
<Color x:Key="SfCartesianChartAxisTitleStroke"/>
23+
<sys:Double x:Key="SfCartesianChartAxisTitleCornerRadius"/>
24+
<sys:Double x:Key="SfCartesianChartAxisTitleTextFontSize"/>
25+
26+
<!--Axis Label-->
27+
<Color x:Key="SfCartesianChartAxisLabelTextColor"/>
28+
<Color x:Key="SfCartesianChartAxisLabelBackground"/>
29+
<Color x:Key="SfCartesianChartAxisLabelStroke"/>
30+
<sys:Double x:Key="SfCartesianChartAxisLabelCornerRadius"/>
31+
<sys:Double x:Key="SfCartesianChartAxisLabelTextFontSize"/>
32+
33+
<!--Trackball-->
34+
<Color x:Key="SfCartesianChartTrackballLineStroke"/>
35+
<Color x:Key="SfCartesianChartTrackballLabelBackground"/>
36+
<Color x:Key="SfCartesianChartTrackballLabelStroke"/>
37+
<Color x:Key="SfCartesianChartTrackballLabelTextColor"/>
38+
<sys:Double x:Key="SfCartesianChartTrackballLabelCornerRadius"/>
39+
<sys:Double x:Key="SfCartesianChartTrackballLabelTextFontSize"/>
40+
41+
<!--Axis Trackball-->
42+
<Color x:Key="SfCartesianChartTrackballAxisLabelBackground"/>
43+
<Color x:Key="SfCartesianChartTrackballAxisLabelStroke"/>
44+
<Color x:Key="SfCartesianChartTrackballAxisLabelTextColor"/>
45+
<sys:Double x:Key="SfCartesianChartTrackballAxisLabelCornerRadius"/>
46+
<sys:Double x:Key="SfCartesianChartTrackballAxisLabelTextFontSize"/>
47+
48+
<!--Annotation-->
49+
<Color x:Key="SfCartesianChartShapeAnnotationFill"/>
50+
<Color x:Key="SfCartesianChartShapeAnnotationStroke"/>
51+
<Color x:Key="SfCartesianChartAnnotationTextColor"/>
52+
<Color x:Key="SfCartesianChartAnnotationTextBackground"/>
53+
<Color x:Key="SfCartesianChartLineAnnotationStroke"/>
54+
55+
<!--Tooltip-->
56+
<Color x:Key="SfCartesianChartTooltipBackground"/>
57+
<Color x:Key="SfCartesianChartTooltipTextColor"/>
58+
<sys:Double x:Key="SfCartesianChartTooltipTextFontSize"/>
59+
60+
<!--Legend-->
61+
<Color x:Key="SfCartesianChartLegendTextColor"/>
62+
<sys:Double x:Key="SfCartesianChartLegendFontSize"/>
63+
<Color x:Key="SfCartesianChartLegendDisableBrush"/>
64+
65+
66+
</ResourceDictionary>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace ChartControlsThemeDemo;
2+
3+
public partial class SfCartesianChartThemeKeys : ResourceDictionary
4+
{
5+
public SfCartesianChartThemeKeys()
6+
{
7+
InitializeComponent();
8+
}
9+
}
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
5+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
6+
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
7+
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->
8+
9+
<!-- Note for MacCatalyst:
10+
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
11+
When specifying both architectures, use the plural <RuntimeIdentifiers> instead of the singular <RuntimeIdentifier>.
12+
The Mac App Store will NOT accept apps with ONLY maccatalyst-arm64 indicated;
13+
either BOTH runtimes must be indicated or ONLY macatalyst-x64. -->
14+
<!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> -->
15+
16+
<OutputType>Exe</OutputType>
17+
<RootNamespace>ChartControlsThemeDemo</RootNamespace>
18+
<UseMaui>true</UseMaui>
19+
<SingleProject>true</SingleProject>
20+
<ImplicitUsings>enable</ImplicitUsings>
21+
<Nullable>enable</Nullable>
22+
23+
<!-- Display name -->
24+
<ApplicationTitle>ChartControlsThemeDemo</ApplicationTitle>
25+
26+
<!-- App Identifier -->
27+
<ApplicationId>com.companyname.chartcontrolsthemedemo</ApplicationId>
28+
29+
<!-- Versions -->
30+
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
31+
<ApplicationVersion>1</ApplicationVersion>
32+
33+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
34+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
35+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
36+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
37+
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
38+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
39+
</PropertyGroup>
40+
41+
<ItemGroup>
42+
<!-- App Icon -->
43+
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
44+
45+
<!-- Splash Screen -->
46+
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
47+
48+
<!-- Images -->
49+
<MauiImage Include="Resources\Images\*" />
50+
<MauiImage Update="Resources\Images\dotnet_bot.png" Resize="True" BaseSize="300,185" />
51+
52+
<!-- Custom Fonts -->
53+
<MauiFont Include="Resources\Fonts\*" />
54+
55+
<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
56+
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
57+
</ItemGroup>
58+
59+
<ItemGroup>
60+
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
61+
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
62+
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
63+
<PackageReference Include="Syncfusion.Maui.Charts" Version="26.1.39" />
64+
<PackageReference Include="Syncfusion.Maui.SunburstChart" Version="26.1.39" />
65+
</ItemGroup>
66+
67+
<ItemGroup>
68+
<MauiXaml Update="CartesianChart\CartesianChartDemo.xaml">
69+
<Generator>MSBuild:Compile</Generator>
70+
</MauiXaml>
71+
<MauiXaml Update="CartesianChart\SfCartesianChartThemeKeys.xaml">
72+
<Generator>MSBuild:Compile</Generator>
73+
</MauiXaml>
74+
<MauiXaml Update="CircularChart\CircularChartDemo.xaml">
75+
<Generator>MSBuild:Compile</Generator>
76+
</MauiXaml>
77+
<MauiXaml Update="CircularChart\SfCircularChartThemeKeys.xaml">
78+
<Generator>MSBuild:Compile</Generator>
79+
</MauiXaml>
80+
<MauiXaml Update="FunnelChart\FunnelChartDemo.xaml">
81+
<Generator>MSBuild:Compile</Generator>
82+
</MauiXaml>
83+
<MauiXaml Update="FunnelChart\SfFunnelChartThemeKeys.xaml">
84+
<Generator>MSBuild:Compile</Generator>
85+
</MauiXaml>
86+
<MauiXaml Update="PyramidChart\PyramidChartDemo.xaml">
87+
<Generator>MSBuild:Compile</Generator>
88+
</MauiXaml>
89+
<MauiXaml Update="PyramidChart\SfPyramidChartThemeKeys.xaml">
90+
<Generator>MSBuild:Compile</Generator>
91+
</MauiXaml>
92+
<MauiXaml Update="SunburstChart\SfSunburstChartThemeKeys.xaml">
93+
<Generator>MSBuild:Compile</Generator>
94+
</MauiXaml>
95+
<MauiXaml Update="SunburstChart\SunburstChartDemo.xaml">
96+
<Generator>MSBuild:Compile</Generator>
97+
</MauiXaml>
98+
</ItemGroup>
99+
100+
</Project>

0 commit comments

Comments
 (0)