Skip to content

Commit 2d1bacd

Browse files
aligned the code snippets
1 parent afe28c6 commit 2d1bacd

File tree

2 files changed

+119
-119
lines changed

2 files changed

+119
-119
lines changed

maui-toolkit/Cartesian-Charts/EmptyPoints.md

Lines changed: 85 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ The data collection that is passed to the chart can have NaN or Null values that
1717

1818
{% highlight C# %}
1919

20-
ProductSales = new ObservableCollection<Model>();
21-
ProductSales.Add(new Model() { Product = "Electronics", Sales = 60 });
22-
ProductSales.Add(new Model() { Product = "Clothing", Sales = 40 });
23-
ProductSales.Add(new Model() { Product = "Groceries", Sales = double.NaN });
24-
ProductSales.Add(new Model() { Product = "Furniture", Sales = 70 });
25-
ProductSales.Add(new Model() { Product = "Toys", Sales = 30 });
26-
ProductSales.Add(new Model() { Product = "Sports", Sales = double.NaN });
27-
ProductSales.Add(new Model() { Product = "Books", Sales = 50 });
20+
ProductSales = new ObservableCollection<Model>();
21+
ProductSales.Add(new Model() { Product = "Electronics", Sales = 60 });
22+
ProductSales.Add(new Model() { Product = "Clothing", Sales = 40 });
23+
ProductSales.Add(new Model() { Product = "Groceries", Sales = double.NaN });
24+
ProductSales.Add(new Model() { Product = "Furniture", Sales = 70 });
25+
ProductSales.Add(new Model() { Product = "Toys", Sales = 30 });
26+
ProductSales.Add(new Model() { Product = "Sports", Sales = double.NaN });
27+
ProductSales.Add(new Model() { Product = "Books", Sales = 50 });
2828

2929
{% endhighlight %}
3030

@@ -47,34 +47,34 @@ The following code example shows the [EmptyPointMode](https://help.syncfusion.co
4747

4848
{% highlight xaml %}
4949

50-
<chart:SfCartesianChart>
51-
52-
.....
53-
<chart:LineSeries ItemsSource="{Binding ProductSales}"
54-
XBindingPath="Product"
55-
YBindingPath="Sales"
56-
EmptyPointMode="Zero">
57-
</chart:LineSeries>
50+
<chart:SfCartesianChart>
51+
52+
.....
53+
<chart:LineSeries ItemsSource="{Binding ProductSales}"
54+
XBindingPath="Product"
55+
YBindingPath="Sales"
56+
EmptyPointMode="Zero">
57+
</chart:LineSeries>
5858

59-
</chart:SfCartesianChart>
59+
</chart:SfCartesianChart>
6060

6161
{% endhighlight %}
6262

6363
{% highlight c# %}
6464

65-
SfCartesianChart chart = new SfCartesianChart();
65+
SfCartesianChart chart = new SfCartesianChart();
6666

67-
.....
68-
LineSeries series = new LineSeries()
69-
{
70-
ItemsSource = new ViewModel().ProductSales,
71-
XBindingPath = "Product",
72-
YBindingPath = "Sales",
73-
EmptyPointMode = EmptyPointMode.Zero
74-
};
67+
.....
68+
LineSeries series = new LineSeries()
69+
{
70+
ItemsSource = new ViewModel().ProductSales,
71+
XBindingPath = "Product",
72+
YBindingPath = "Sales",
73+
EmptyPointMode = EmptyPointMode.Zero
74+
};
7575

76-
chart.Series.Add(series);
77-
this.Content = chart;
76+
chart.Series.Add(series);
77+
this.Content = chart;
7878

7979
{% endhighlight %}
8080

@@ -88,34 +88,34 @@ The following code example shows the [EmptyPointMode](https://help.syncfusion.co
8888

8989
{% highlight xaml %}
9090

91-
<chart:SfCartesianChart>
91+
<chart:SfCartesianChart>
9292

93-
.....
94-
<chart:ColumnSeries ItemsSource="{Binding ProductSales}"
95-
XBindingPath="Product"
96-
YBindingPath="Sales"
97-
EmptyPointMode="Average">
98-
</chart:ColumnSeries>
93+
.....
94+
<chart:ColumnSeries ItemsSource="{Binding ProductSales}"
95+
XBindingPath="Product"
96+
YBindingPath="Sales"
97+
EmptyPointMode="Average">
98+
</chart:ColumnSeries>
9999

100-
</chart:SfCartesianChart>
100+
</chart:SfCartesianChart>
101101

102102
{% endhighlight %}
103103

104104
{% highlight c# %}
105105

106-
SfCartesianChart chart = new SfCartesianChart();
106+
SfCartesianChart chart = new SfCartesianChart();
107107

108-
.....
109-
ColumnSeries series = new ColumnSeries()
110-
{
111-
ItemsSource = new ViewModel().ProductSales,
112-
XBindingPath = "Product",
113-
YBindingPath = "Sales",
114-
EmptyPointMode = EmptyPointMode.Average
115-
};
108+
.....
109+
ColumnSeries series = new ColumnSeries()
110+
{
111+
ItemsSource = new ViewModel().ProductSales,
112+
XBindingPath = "Product",
113+
YBindingPath = "Sales",
114+
EmptyPointMode = EmptyPointMode.Average
115+
};
116116

117-
chart.Series.Add(series);
118-
this.Content = chart;
117+
chart.Series.Add(series);
118+
this.Content = chart;
119119

120120
{% endhighlight %}
121121

@@ -134,53 +134,53 @@ The [EmptyPointSettings](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.
134134

135135
{% highlight xaml %}
136136

137-
<chart:SfCartesianChart>
138-
139-
.....
140-
<chart:LineSeries ItemsSource="{Binding ProductSales}"
141-
XBindingPath="Product"
142-
YBindingPath="Sales"
143-
Fill="#3068F7"
144-
StrokeWidth="2"
145-
ShowMarkers="True"
146-
ShowDataLabels="True"
147-
EmptyPointMode="Average">
137+
<chart:SfCartesianChart>
138+
139+
.....
140+
<chart:LineSeries ItemsSource="{Binding ProductSales}"
141+
XBindingPath="Product"
142+
YBindingPath="Sales"
143+
Fill="#3068F7"
144+
StrokeWidth="2"
145+
ShowMarkers="True"
146+
ShowDataLabels="True"
147+
EmptyPointMode="Average">
148148
<chart:LineSeries.EmptyPointSettings>
149-
<chart:EmptyPointSettings Fill="Orange" StrokeWidth="2"/>
149+
<chart:EmptyPointSettings Fill="Orange" StrokeWidth="2"/>
150150
</chart:LineSeries.EmptyPointSettings>
151151
</chart:LineSeries>
152152

153-
</chart:SfCartesianChart>
153+
</chart:SfCartesianChart>
154154

155155
{% endhighlight %}
156156

157157
{% highlight c# %}
158158

159-
SfCartesianChart chart = new SfCartesianChart();
160-
161-
.....
162-
LineSeries series = new LineSeries()
163-
{
164-
ItemsSource = new ViewModel().ProductSales,
165-
XBindingPath = "Product",
166-
YBindingPath = "Sales",
167-
Fill = Color.FromArgb("#3068F7"),
168-
StrokeWidth = 2,
169-
ShowMarkers = true,
170-
ShowDataLabels = true,
171-
EmptyPointMode = EmptyPointMode.Average
172-
};
173-
174-
EmptyPointSettings emptypointSettings = new EmptyPointSettings()
175-
{
176-
Fill = Colors.Orange,
177-
StrokeWidth = 2
178-
};
179-
180-
series.EmptyPointSettings = emptypointSettings;
181-
182-
chart.Series.Add(series);
183-
this.Content = chart;
159+
SfCartesianChart chart = new SfCartesianChart();
160+
161+
.....
162+
LineSeries series = new LineSeries()
163+
{
164+
ItemsSource = new ViewModel().ProductSales,
165+
XBindingPath = "Product",
166+
YBindingPath = "Sales",
167+
Fill = Color.FromArgb("#3068F7"),
168+
StrokeWidth = 2,
169+
ShowMarkers = true,
170+
ShowDataLabels = true,
171+
EmptyPointMode = EmptyPointMode.Average
172+
};
173+
174+
EmptyPointSettings emptypointSettings = new EmptyPointSettings()
175+
{
176+
Fill = Colors.Orange,
177+
StrokeWidth = 2
178+
};
179+
180+
series.EmptyPointSettings = emptypointSettings;
181+
182+
chart.Series.Add(series);
183+
this.Content = chart;
184184

185185
{% endhighlight %}
186186

maui-toolkit/Cartesian-Charts/FastScatter.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -20,55 +20,55 @@ N> The Cartesian chart has [Series](https://help.syncfusion.com/cr/maui-toolkit/
2020

2121
{% highlight xaml %}
2222

23-
<chart:SfCartesianChart>
23+
<chart:SfCartesianChart>
2424

25-
<chart:SfCartesianChart.XAxes>
26-
<chart:NumericalAxis/>
27-
</chart:SfCartesianChart.XAxes>
25+
<chart:SfCartesianChart.XAxes>
26+
<chart:NumericalAxis/>
27+
</chart:SfCartesianChart.XAxes>
2828

29-
<chart:SfCartesianChart.YAxes>
30-
<chart:NumericalAxis/>
31-
</chart:SfCartesianChart.YAxes>
29+
<chart:SfCartesianChart.YAxes>
30+
<chart:NumericalAxis/>
31+
</chart:SfCartesianChart.YAxes>
3232

33-
<chart:FastScatterSeries ItemsSource="{Binding Data1}"
34-
XBindingPath="XValue"
35-
YBindingPath="YValue"/>
33+
<chart:FastScatterSeries ItemsSource="{Binding Data1}"
34+
XBindingPath="XValue"
35+
YBindingPath="YValue" />
3636

37-
<chart:FastScatterSeries ItemsSource="{Binding Data2}"
38-
XBindingPath="XValue"
39-
YBindingPath="YValue"/>
37+
<chart:FastScatterSeries ItemsSource="{Binding Data2}"
38+
XBindingPath="XValue"
39+
YBindingPath="YValue" />
4040

41-
</chart:SfCartesianChart>
41+
</chart:SfCartesianChart>
4242

4343
{% endhighlight %}
4444

4545
{% highlight c# %}
4646

47-
SfCartesianChart chart = new SfCartesianChart();
47+
SfCartesianChart chart = new SfCartesianChart();
4848

49-
NumericalAxis primaryAxis = new NumericalAxis();
50-
chart.XAxes.Add(primaryAxis);
49+
NumericalAxis primaryAxis = new NumericalAxis();
50+
chart.XAxes.Add(primaryAxis);
5151

52-
NumericalAxis secondaryAxis = new NumericalAxis();
53-
chart.YAxes.Add(secondaryAxis);
52+
NumericalAxis secondaryAxis = new NumericalAxis();
53+
chart.YAxes.Add(secondaryAxis);
5454

55-
FastScatterSeries scatterSeries1 = new FastScatterSeries
56-
{
57-
ItemsSource = new ViewModel().Data1,
58-
XBindingPath = "XValue",
59-
YBindingPath = "YValue",
60-
};
55+
FastScatterSeries scatterSeries1 = new FastScatterSeries
56+
{
57+
ItemsSource = new ViewModel().Data1,
58+
XBindingPath = "XValue",
59+
YBindingPath = "YValue",
60+
};
6161

62-
FastScatterSeries scatterSeries2 = new FastScatterSeries
63-
{
64-
ItemsSource = new ViewModel().Data2,
65-
XBindingPath = "XValue",
66-
YBindingPath = "XValue",
67-
};
62+
FastScatterSeries scatterSeries2 = new FastScatterSeries
63+
{
64+
ItemsSource = new ViewModel().Data2,
65+
XBindingPath = "XValue",
66+
YBindingPath = "XValue",
67+
};
6868

69-
chart.Series.Add(scatterSeries1);
70-
chart.Series.Add(scatterSeries2);
71-
this.Content = chart;
69+
chart.Series.Add(scatterSeries1);
70+
chart.Series.Add(scatterSeries2);
71+
this.Content = chart;
7272

7373
{% endhighlight %}
7474

0 commit comments

Comments
 (0)