Skip to content

Commit 36b4406

Browse files
Merge pull request #5 from SyncfusionExamples/Chart-Sample
Updated the model and view model name in chart samples
2 parents c638187 + 427b785 commit 36b4406

File tree

20 files changed

+107
-107
lines changed

20 files changed

+107
-107
lines changed

CartesianChart/GettingStarted/GettingStarted/MainPage.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
x:Class="GettingStarted.MainPage">
77

88
<ContentPage.BindingContext>
9-
<model:ViewModel/>
9+
<model:PersonViewModel />
1010
</ContentPage.BindingContext>
1111

1212
<chart:SfCartesianChart>

CartesianChart/GettingStarted/GettingStarted/Model/Person.cs renamed to CartesianChart/GettingStarted/GettingStarted/Model/PersonModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace GettingStarted
22
{
3-
public class Person
3+
public class PersonModel
44
{
55
public string? Name { get; set; }
66
public double Height { get; set; }
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
namespace GettingStarted
2+
{
3+
public class PersonViewModel
4+
{
5+
public List<PersonModel> Data { get; set; }
6+
public PersonViewModel()
7+
{
8+
Data = new List<PersonModel>()
9+
{
10+
new PersonModel { Name = "David", Height = 170 },
11+
new PersonModel { Name = "Michael", Height = 96 },
12+
new PersonModel { Name = "Steve", Height = 65 },
13+
new PersonModel { Name = "Joel", Height = 182 },
14+
new PersonModel { Name = "Bob", Height = 134 }
15+
};
16+
}
17+
}
18+
}

CartesianChart/GettingStarted/GettingStarted/ViewModel/ViewModel.cs

Lines changed: 0 additions & 18 deletions
This file was deleted.

CircularChart/GettingStarted/GettingStarted/MainPage.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</chart:SfCircularChart.Title>
1212

1313
<chart:SfCircularChart.BindingContext>
14-
<model:ViewModel/>
14+
<model:SalesViewModel/>
1515
</chart:SfCircularChart.BindingContext>
1616

1717
<chart:SfCircularChart.Legend>

CircularChart/GettingStarted/GettingStarted/Model/Sales.cs renamed to CircularChart/GettingStarted/GettingStarted/Model/SalesModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace GettingStarted
22
{
3-
public class Sales
3+
public class SalesModel
44
{
55
public string? Product { get; set; }
66
public double SalesRate { get; set; }
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
namespace GettingStarted
2+
{
3+
public class SalesViewModel
4+
{
5+
public List<SalesModel> Data { get; set; }
6+
7+
public SalesViewModel()
8+
{
9+
Data = new List<SalesModel>()
10+
{
11+
new SalesModel(){Product = "iPad", SalesRate = 70},
12+
new SalesModel(){Product = "iPhone", SalesRate = 65},
13+
new SalesModel(){Product = "MacBook", SalesRate = 60},
14+
new SalesModel(){Product = "Mac", SalesRate = 55},
15+
new SalesModel(){Product = "Others", SalesRate = 50},
16+
};
17+
}
18+
}
19+
}

CircularChart/GettingStarted/GettingStarted/ViewModel/ViewModel.cs

Lines changed: 0 additions & 19 deletions
This file was deleted.

FunnelChart/GettingStarted/GettingStarted/MainPage.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</chart:SfFunnelChart.Title>
1717

1818
<chart:SfFunnelChart.BindingContext>
19-
<model:ChartViewModel/>
19+
<model:AdmissionViewModel/>
2020
</chart:SfFunnelChart.BindingContext>
2121

2222
<chart:SfFunnelChart.Legend>

FunnelChart/GettingStarted/GettingStarted/Model/Admission.cs renamed to FunnelChart/GettingStarted/GettingStarted/Model/AdmissionModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace GettingStarted
22
{
3-
public class Admission
3+
public class AdmissionModel
44
{
55
public string? XValue { get; set; }
66
public double YValue { get; set; }

0 commit comments

Comments
 (0)