Skip to content

Commit 27303fe

Browse files
sample
1 parent 38d9cd2 commit 27303fe

File tree

53 files changed

+127535
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+127535
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.11.35208.52
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ForecastFastLineChartWithPlotBand", "ForecastFastLineChartWithPlotBand\ForecastFastLineChartWithPlotBand.csproj", "{2607B675-E2F8-4DC1-A7FC-7D2E5C66E073}"
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+
{2607B675-E2F8-4DC1-A7FC-7D2E5C66E073}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{2607B675-E2F8-4DC1-A7FC-7D2E5C66E073}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{2607B675-E2F8-4DC1-A7FC-7D2E5C66E073}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{2607B675-E2F8-4DC1-A7FC-7D2E5C66E073}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {990BABA8-F56C-410E-BCE2-9DC96236F79B}
24+
EndGlobalSection
25+
EndGlobal
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
5+
</startup>
6+
</configuration>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Application x:Class="ForecastFastLineChartWithPlotBand.App"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:local="clr-namespace:ForecastFastLineChartWithPlotBand"
5+
StartupUri="MainWindow.xaml">
6+
<Application.Resources>
7+
8+
</Application.Resources>
9+
</Application>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Configuration;
4+
using System.Data;
5+
using System.Linq;
6+
using System.Threading.Tasks;
7+
using System.Windows;
8+
9+
namespace ForecastFastLineChartWithPlotBand
10+
{
11+
/// <summary>
12+
/// Interaction logic for App.xaml
13+
/// </summary>
14+
public partial class App : Application
15+
{
16+
}
17+
}
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{2607B675-E2F8-4DC1-A7FC-7D2E5C66E073}</ProjectGuid>
8+
<OutputType>WinExe</OutputType>
9+
<RootNamespace>ForecastFastLineChartWithPlotBand</RootNamespace>
10+
<AssemblyName>ForecastFastLineChartWithPlotBand</AssemblyName>
11+
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
14+
<WarningLevel>4</WarningLevel>
15+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
16+
<Deterministic>true</Deterministic>
17+
</PropertyGroup>
18+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
19+
<PlatformTarget>AnyCPU</PlatformTarget>
20+
<DebugSymbols>true</DebugSymbols>
21+
<DebugType>full</DebugType>
22+
<Optimize>false</Optimize>
23+
<OutputPath>bin\Debug\</OutputPath>
24+
<DefineConstants>DEBUG;TRACE</DefineConstants>
25+
<ErrorReport>prompt</ErrorReport>
26+
<WarningLevel>4</WarningLevel>
27+
</PropertyGroup>
28+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
29+
<PlatformTarget>AnyCPU</PlatformTarget>
30+
<DebugType>pdbonly</DebugType>
31+
<Optimize>true</Optimize>
32+
<OutputPath>bin\Release\</OutputPath>
33+
<DefineConstants>TRACE</DefineConstants>
34+
<ErrorReport>prompt</ErrorReport>
35+
<WarningLevel>4</WarningLevel>
36+
</PropertyGroup>
37+
<ItemGroup>
38+
<Reference Include="Syncfusion.Licensing, Version=26.2462.14.0, Culture=neutral, PublicKeyToken=632609b4d040f6b4, processorArchitecture=MSIL">
39+
<HintPath>..\packages\Syncfusion.Licensing.26.2.14\lib\net462\Syncfusion.Licensing.dll</HintPath>
40+
</Reference>
41+
<Reference Include="Syncfusion.SfChart.WPF, Version=26.2462.14.0, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
42+
<HintPath>..\packages\Syncfusion.SfChart.WPF.26.2.14\lib\net462\Syncfusion.SfChart.WPF.dll</HintPath>
43+
</Reference>
44+
<Reference Include="System" />
45+
<Reference Include="System.Data" />
46+
<Reference Include="System.Xml" />
47+
<Reference Include="Microsoft.CSharp" />
48+
<Reference Include="System.Core" />
49+
<Reference Include="System.Xml.Linq" />
50+
<Reference Include="System.Data.DataSetExtensions" />
51+
<Reference Include="System.Net.Http" />
52+
<Reference Include="System.Xaml">
53+
<RequiredTargetFramework>4.0</RequiredTargetFramework>
54+
</Reference>
55+
<Reference Include="WindowsBase" />
56+
<Reference Include="PresentationCore" />
57+
<Reference Include="PresentationFramework" />
58+
</ItemGroup>
59+
<ItemGroup>
60+
<ApplicationDefinition Include="App.xaml">
61+
<Generator>MSBuild:Compile</Generator>
62+
<SubType>Designer</SubType>
63+
</ApplicationDefinition>
64+
<Compile Include="ViewModel\ViewModel.cs" />
65+
<Page Include="MainWindow.xaml">
66+
<Generator>MSBuild:Compile</Generator>
67+
<SubType>Designer</SubType>
68+
</Page>
69+
<Compile Include="App.xaml.cs">
70+
<DependentUpon>App.xaml</DependentUpon>
71+
<SubType>Code</SubType>
72+
</Compile>
73+
<Compile Include="MainWindow.xaml.cs">
74+
<DependentUpon>MainWindow.xaml</DependentUpon>
75+
<SubType>Code</SubType>
76+
</Compile>
77+
</ItemGroup>
78+
<ItemGroup>
79+
<Compile Include="Model\Model.cs" />
80+
<Compile Include="Properties\AssemblyInfo.cs">
81+
<SubType>Code</SubType>
82+
</Compile>
83+
<Compile Include="Properties\Resources.Designer.cs">
84+
<AutoGen>True</AutoGen>
85+
<DesignTime>True</DesignTime>
86+
<DependentUpon>Resources.resx</DependentUpon>
87+
</Compile>
88+
<Compile Include="Properties\Settings.Designer.cs">
89+
<AutoGen>True</AutoGen>
90+
<DependentUpon>Settings.settings</DependentUpon>
91+
<DesignTimeSharedInput>True</DesignTimeSharedInput>
92+
</Compile>
93+
<EmbeddedResource Include="Properties\Resources.resx">
94+
<Generator>ResXFileCodeGenerator</Generator>
95+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
96+
</EmbeddedResource>
97+
<EmbeddedResource Include="data.csv" />
98+
<None Include="packages.config" />
99+
<None Include="Properties\Settings.settings">
100+
<Generator>SettingsSingleFileGenerator</Generator>
101+
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
102+
</None>
103+
</ItemGroup>
104+
<ItemGroup>
105+
<None Include="App.config" />
106+
</ItemGroup>
107+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
108+
</Project>
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
<Window x:Class="ForecastFastLineChartWithPlotBand.MainWindow"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6+
xmlns:local="clr-namespace:ForecastFastLineChartWithPlotBand"
7+
mc:Ignorable="d"
8+
Title="MainWindow" Height="450" Width="800"
9+
xmlns:sync="clr-namespace:Syncfusion.UI.Xaml.Charts;assembly=Syncfusion.SfChart.WPF">
10+
11+
<Border Padding="15,15,25,15" Margin="10" BorderBrush="Black" BorderThickness="2" CornerRadius="10">
12+
13+
<sync:SfChart x:Name="chart" HorizontalHeaderAlignment="Left">
14+
15+
<sync:SfChart.DataContext>
16+
<local:ViewModel x:Name="viewModel"/>
17+
</sync:SfChart.DataContext>
18+
19+
<sync:SfChart.Resources>
20+
<local:TooltipValueConverter x:Key="converter"/>
21+
<DataTemplate x:Key="labelTemplate">
22+
23+
<Border CornerRadius="5" BorderThickness="1"
24+
BorderBrush="Black" Background="White" Padding="10" Margin="8">
25+
26+
<StackPanel Orientation="Vertical">
27+
<TextBlock Foreground="Black" Background="LightGray" FontSize="15"
28+
Text="{Binding Item, Converter={StaticResource converter}, ConverterParameter=0}"/>
29+
<Grid Margin="0, 5, 0, 0">
30+
<Grid.RowDefinitions>
31+
<RowDefinition Height="20"/>
32+
<RowDefinition Height="20"/>
33+
<RowDefinition Height="20"/>
34+
<RowDefinition Height="20"/>
35+
<RowDefinition Height="20"/>
36+
<RowDefinition Height="20"/>
37+
</Grid.RowDefinitions>
38+
<Grid.ColumnDefinitions>
39+
<ColumnDefinition Width="15"/>
40+
<ColumnDefinition Width="80"/>
41+
<ColumnDefinition Width="50"/>
42+
</Grid.ColumnDefinitions>
43+
44+
<StackPanel Background="{Binding Item, Converter={StaticResource converter}, ConverterParameter=7}" Height="10" Width="10" Margin="0, -2, 0, 0" Grid.Column="0" Grid.Row="0"/>
45+
<StackPanel Background="{Binding Item, Converter={StaticResource converter}, ConverterParameter=8}" Height="10" Width="10" Margin="0, -2, 0, 0" Grid.Column="0" Grid.Row="1"/>
46+
<StackPanel Background="{Binding Item, Converter={StaticResource converter}, ConverterParameter=9}" Height="10" Width="10" Margin="0, -2, 0, 0" Grid.Column="0" Grid.Row="2"/>
47+
<StackPanel Background="{Binding Item, Converter={StaticResource converter}, ConverterParameter=10}" Height="10" Width="10" Margin="0, -2, 0, 0" Grid.Column="0" Grid.Row="3"/>
48+
<StackPanel Background="{Binding Item, Converter={StaticResource converter}, ConverterParameter=11}" Height="10" Width="10" Margin="0, -2, 0, 0" Grid.Column="0" Grid.Row="4"/>
49+
<StackPanel Background="{Binding Item, Converter={StaticResource converter}, ConverterParameter=12}" Height="10" Width="10" Margin="0, -2, 0, 0" Grid.Column="0" Grid.Row="5"/>
50+
51+
<TextBlock Foreground="Black" Text="Total" Grid.Row="0" Grid.Column="1"/>
52+
<TextBlock Foreground="Black" Text="Under 25" Grid.Row="1" Grid.Column="1"/>
53+
<TextBlock Foreground="Black" Text="Ages 25-64" Grid.Row="2" Grid.Column="1"/>
54+
<TextBlock Foreground="Black" Text="Under 15" Grid.Row="3" Grid.Column="1"/>
55+
<TextBlock Foreground="Black" Text="Under 4" Grid.Row="4" Grid.Column="1"/>
56+
<TextBlock Foreground="Black" Text="Above 65" Grid.Row="5" Grid.Column="1"/>
57+
58+
<TextBlock Foreground="Black" Text="{Binding Item, Converter={StaticResource converter}, ConverterParameter=1}" Grid.Column="2" Grid.Row="0" HorizontalAlignment="Center"/>
59+
<TextBlock Foreground="Black" Text="{Binding Item, Converter={StaticResource converter}, ConverterParameter=2}" Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center"/>
60+
<TextBlock Foreground="Black" Text="{Binding Item, Converter={StaticResource converter}, ConverterParameter=3}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Center"/>
61+
<TextBlock Foreground="Black" Text="{Binding Item, Converter={StaticResource converter}, ConverterParameter=4}" Grid.Column="2" Grid.Row="3" HorizontalAlignment="Center"/>
62+
<TextBlock Foreground="Black" Text="{Binding Item, Converter={StaticResource converter}, ConverterParameter=5}" Grid.Column="2" Grid.Row="4" HorizontalAlignment="Center"/>
63+
<TextBlock Foreground="Black" Text="{Binding Item, Converter={StaticResource converter}, ConverterParameter=6}" Grid.Column="2" Grid.Row="5" HorizontalAlignment="Center"/>
64+
</Grid>
65+
</StackPanel>
66+
</Border>
67+
68+
</DataTemplate>
69+
70+
</sync:SfChart.Resources>
71+
72+
<sync:SfChart.Header>
73+
<Border BorderBrush="White" Margin="0, 0, 0, 10">
74+
<StackPanel Orientation="Horizontal" Margin="-20, 0, 0, 0">
75+
<Grid>
76+
<Ellipse Width="5" Height="5" Fill="Gray" Margin="0.5, 15, 0, 0"/>
77+
<Path Margin="0,35,0,0" Data="{Binding PathData1}" Stretch="Uniform" Stroke="Gray" StrokeThickness="1"
78+
Fill="Gray" Width="40" Height="18" RenderTransformOrigin="0.5,0.5"/>
79+
</Grid>
80+
<Path Margin="-19,-8,0,0" Data="{Binding PathData}" Stretch="Uniform"
81+
Fill="Gray" Width="60" Height="60" RenderTransformOrigin="0.5,0.5"/>
82+
<StackPanel>
83+
<TextBlock FontSize="22" Margin="5, 0, 0, 0" Text="Global Population by Age Group" FontWeight="Bold"/>
84+
<TextBlock FontSize="13" Margin="5, 0, 0, 0" Text="Exploring Population Trends from 1950 to 2023 and Future Projections to 2100." FontWeight="Medium" Foreground="Gray"/>
85+
</StackPanel>
86+
</StackPanel>
87+
</Border>
88+
</sync:SfChart.Header>
89+
90+
<sync:SfChart.PrimaryAxis>
91+
<sync:NumericalAxis ShowGridLines="False" PlotOffsetEnd="5">
92+
<sync:NumericalAxis.StripLines>
93+
<sync:ChartStripLine Start="2024" Width="100" Background="#dbd9d9" Opacity="0.2"/>
94+
</sync:NumericalAxis.StripLines>
95+
</sync:NumericalAxis>
96+
</sync:SfChart.PrimaryAxis>
97+
98+
<sync:SfChart.SecondaryAxis>
99+
<sync:NumericalAxis Interval="2000000000" LabelCreated="NumericalAxis_LabelCreated_1"/>
100+
</sync:SfChart.SecondaryAxis>
101+
102+
<sync:SfChart.Behaviors>
103+
<sync:ChartTrackBallBehavior/>
104+
</sync:SfChart.Behaviors>
105+
106+
<sync:FastLineSeries x:Name="series" ShowTrackballInfo="False" ItemsSource="{Binding HistoricalPopulationData}" XBindingPath="Year" YBindingPath="TotalPopulation"/>
107+
<sync:FastLineSeries x:Name="series1" ShowTrackballInfo="True" ItemsSource="{Binding HistoricalPopulationData}" XBindingPath="Year" YBindingPath="Under25" TrackBallLabelTemplate="{StaticResource labelTemplate}"/>
108+
<sync:FastLineSeries x:Name="series2" ShowTrackballInfo="False" ItemsSource="{Binding HistoricalPopulationData}" XBindingPath="Year" YBindingPath="Between25to64"/>
109+
<sync:FastLineSeries x:Name="series3" ShowTrackballInfo="False" ItemsSource="{Binding HistoricalPopulationData}" XBindingPath="Year" YBindingPath="Under15"/>
110+
<sync:FastLineSeries x:Name="series4" ShowTrackballInfo="False" ItemsSource="{Binding HistoricalPopulationData}" XBindingPath="Year" YBindingPath="Under4"/>
111+
<sync:FastLineSeries x:Name="series5" ShowTrackballInfo="False" ItemsSource="{Binding HistoricalPopulationData}" XBindingPath="Year" YBindingPath="Above65"/>
112+
113+
<sync:FastLineSeries x:Name="series6" ShowTrackballInfo="False" ItemsSource="{Binding ForecastPopulationData }" XBindingPath="Year" YBindingPath="TotalPopulation"/>
114+
<sync:FastLineSeries x:Name="series7" ShowTrackballInfo="True" ItemsSource="{Binding ForecastPopulationData }" XBindingPath="Year" YBindingPath="Under25" TrackBallLabelTemplate="{StaticResource labelTemplate}"/>
115+
<sync:FastLineSeries x:Name="series8" ShowTrackballInfo="False" ItemsSource="{Binding ForecastPopulationData }" XBindingPath="Year" YBindingPath="Between25to64"/>
116+
<sync:FastLineSeries x:Name="series9" ShowTrackballInfo="False" ItemsSource="{Binding ForecastPopulationData }" XBindingPath="Year" YBindingPath="Under15"/>
117+
<sync:FastLineSeries x:Name="series10" ShowTrackballInfo="False" ItemsSource="{Binding ForecastPopulationData }" XBindingPath="Year" YBindingPath="Under4"/>
118+
<sync:FastLineSeries x:Name="series11" ShowTrackballInfo="False" ItemsSource="{Binding ForecastPopulationData }" XBindingPath="Year" YBindingPath="Above65"/>
119+
120+
</sync:SfChart>
121+
122+
</Border>
123+
124+
</Window>

0 commit comments

Comments
 (0)