Skip to content

Commit 4ac7066

Browse files
Merge pull request #282 from syncfusion-content/resolve-chart-conflicts
Resolve Chart Conflicts - Master
2 parents f775481 + 71ac40f commit 4ac7066

File tree

7 files changed

+120
-113
lines changed

7 files changed

+120
-113
lines changed

maui-toolkit/Cartesian-Charts/EmptyPoints.md

Lines changed: 88 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -11,184 +11,181 @@ keywords: .net maui chart empty points, .net maui empty points customization, sy
1111
# Empty Points in .NET MAUI Chart
1212
Empty Points are used to indicate missing or null data in a series. These empty points can occur when data is unavailable, improperly formatted, or explicitly set as null or double.NaN. The chart provides options to handle and customize these empty points to enhance visualization and maintain the integrity of data representation.
1313

14-
[SfCartesianChart](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Charts.SfCartesianChart.html) provides support for empty points, allowing users to handle missing data effectively.
14+
[SfCartesianChart](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.SfCartesianChart.html) provides support for empty points, allowing users to handle missing data effectively.
1515

1616
The data collection that is passed to the chart can have NaN or Null values that are considered as empty points. The empty point can be defined as in the below code example.
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

31-
By default, the [EmptyPointMode]() property is `None`. So the empty points will not be rendered as shown in the below.
31+
By default, the [EmptyPointMode](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.EmptyPointMode.html) property is `None`. So the empty points will not be rendered as shown in the below.
3232

3333
![Empty Points in MAUI Chart](EmptyPoints_images/EmptyPoints_Default.png)
3434

3535
## Empty Point Mode
36-
The [EmptyPointMode]() property of series specifies how empty points should be handled.
36+
The [EmptyPointMode](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.EmptyPointMode.html) property of series specifies how empty points should be handled.
3737

38-
This property is an enumeration with the following options:
38+
This property provides the following options.
3939

40-
* None - Empty points are not rendered. This is the default behavior.
41-
* Zero - Empty points will be replaced with zero.
42-
* Average - Empty points will be replaced with the average value of the surrounding data points.
40+
* **None** - Empty points are not rendered. This is the default behavior.
41+
* **Zero** - Empty points will be replaced with zero.
42+
* **Average** - Empty points will be replaced with the average value of the surrounding data points.
4343

44-
The following code example shows the [EmptyPointMode]() as `Zero`.
44+
The following code example shows the [EmptyPointMode](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.EmptyPointMode.html) as `Zero`.
4545

4646
{% tabs %}
4747

4848
{% highlight xaml %}
4949

50-
<chart:SfCartesianChart>
51-
52-
.....
53-
54-
<chart:LineSeries ItemsSource="{Binding ProductSales}"
50+
<chart:SfCartesianChart>
51+
52+
.....
53+
<chart:LineSeries ItemsSource="{Binding ProductSales}"
5554
XBindingPath="Product"
5655
YBindingPath="Sales"
5756
EmptyPointMode="Zero">
58-
</chart:LineSeries>
59-
</chart:SfCartesianChart>
57+
</chart:LineSeries>
58+
59+
</chart:SfCartesianChart>
6060

6161
{% endhighlight %}
6262

6363
{% highlight c# %}
6464

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

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

69-
LineSeries series = new LineSeries()
70-
{
71-
ItemsSource = new ViewModel().ProductSales,
72-
XBindingPath = "Product",
73-
YBindingPath = "Sales",
74-
EmptyPointMode = EmptyPointMode.Zero
75-
};
76-
77-
chart.Series.Add(series);
78-
this.Content = chart;
76+
chart.Series.Add(series);
77+
this.Content = chart;
7978

8079
{% endhighlight %}
8180

8281
{% endtabs %}
8382

8483
![EmptyPoint Mode Zero in MAUI Chart](EmptyPoints_images/EmptyPoints_Mode_Zero.png)
8584

86-
The following code example shows the [EmptyPointMode]() as `Average`.
85+
The following code example shows the [EmptyPointMode](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.EmptyPointMode.html) as `Average`.
8786

8887
{% tabs %}
8988

9089
{% highlight xaml %}
9190

92-
<chart:SfCartesianChart>
93-
94-
.....
91+
<chart:SfCartesianChart>
9592

96-
<chart:ColumnSeries ItemsSource="{Binding ProductSales}"
93+
.....
94+
<chart:ColumnSeries ItemsSource="{Binding ProductSales}"
9795
XBindingPath="Product"
9896
YBindingPath="Sales"
9997
EmptyPointMode="Average">
100-
</chart:ColumnSeries>
101-
</chart:SfCartesianChart>
98+
</chart:ColumnSeries>
99+
100+
</chart:SfCartesianChart>
102101

103102
{% endhighlight %}
104103

105104
{% highlight c# %}
106105

107-
SfCartesianChart chart = new SfCartesianChart();
108-
109-
.....
106+
SfCartesianChart chart = new SfCartesianChart();
110107

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

119-
chart.Series.Add(series);
120-
this.Content = chart;
117+
chart.Series.Add(series);
118+
this.Content = chart;
121119

122120
{% endhighlight %}
123121

124122
{% endtabs %}
125123

126124
![EmptyPoint Mode Average in MAUI Chart](EmptyPoints_images/EmptyPoints_Mode_Average.png)
127125

128-
## Customizing Empty Points
129-
The [EmptyPointSettings]() property allows you to customize the appearance of empty points in a series. This enables you to adjust various visual aspects of empty points, making them more distinct from the other data points. You can modify the following properties within [EmptyPointSettings]().
126+
## Empty Point Customization
127+
The [EmptyPointSettings](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.EmptyPointSettings.html) property allows you to customize the appearance of empty points in a series. This enables you to adjust various visual aspects of empty points, making them more distinct from the other data points. You can modify the following properties within [EmptyPointSettings](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.EmptyPointSettings.html).
130128

131-
* [Fill]() - Gets or sets the fill color for the empty points.
132-
* [Stroke]() - Gets or sets the stroke color for empty points.
133-
* [StrokeWidth]() - Gets or sets the stroke thickness for empty points.
129+
* [Fill](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.EmptyPointSettings.html#Syncfusion_Maui_Toolkit_Charts_EmptyPointSettings_Fill) - Gets or sets the fill color for the empty points.
130+
* [Stroke](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.EmptyPointSettings.html#Syncfusion_Maui_Toolkit_Charts_EmptyPointSettings_Stroke) - Gets or sets the stroke color for empty points.
131+
* [StrokeWidth](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.EmptyPointSettings.html#Syncfusion_Maui_Toolkit_Charts_EmptyPointSettings_StrokeWidth) - Gets or sets the stroke thickness for empty points.
134132

135133
{% tabs %}
136134

137135
{% highlight xaml %}
138136

139-
<chart:SfCartesianChart>
140-
141-
.....
137+
<chart:SfCartesianChart>
142138

143-
<chart:LineSeries ItemsSource="{Binding ProductSales}"
139+
.....
140+
<chart:LineSeries ItemsSource="{Binding ProductSales}"
144141
XBindingPath="Product"
145142
YBindingPath="Sales"
146143
Fill="#3068F7"
147144
StrokeWidth="2"
148145
ShowMarkers="True"
149146
ShowDataLabels="True"
150147
EmptyPointMode="Average">
151-
<chart:LineSeries.EmptyPointSettings>
152-
<chart:EmptyPointSettings Fill="Orange" StrokeWidth="2"/>
153-
</chart:LineSeries.EmptyPointSettings>
154-
</chart:LineSeries>
155-
</chart:SfCartesianChart>
148+
<chart:LineSeries.EmptyPointSettings>
149+
<chart:EmptyPointSettings Fill="Orange" StrokeWidth="2"/>
150+
</chart:LineSeries.EmptyPointSettings>
151+
</chart:LineSeries>
152+
153+
</chart:SfCartesianChart>
156154

157155
{% endhighlight %}
158156

159157
{% highlight c# %}
160158

161-
SfCartesianChart chart = new SfCartesianChart();
162-
163-
.....
159+
SfCartesianChart chart = new SfCartesianChart();
164160

165-
LineSeries series = new LineSeries()
166-
{
167-
ItemsSource = new ViewModel().ProductSales,
168-
XBindingPath = "Product",
169-
YBindingPath = "Sales",
170-
Fill = Color.FromArgb("#3068F7"),
171-
StrokeWidth = 2,
172-
ShowMarkers = true,
173-
ShowDataLabels = true,
174-
EmptyPointMode = EmptyPointMode.Average
175-
};
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+
};
176173

177-
EmptyPointSettings emptypointSettings = new EmptyPointSettings()
178-
{
179-
Fill = Colors.Orange,
180-
StrokeWidth = 2
181-
};
174+
EmptyPointSettings emptypointSettings = new EmptyPointSettings()
175+
{
176+
Fill = Colors.Orange,
177+
StrokeWidth = 2
178+
};
182179

183-
series.EmptyPointSettings = emptypointSettings;
180+
series.EmptyPointSettings = emptypointSettings;
184181

185-
chart.Series.Add(series);
186-
this.Content = chart;
182+
chart.Series.Add(series);
183+
this.Content = chart;
187184

188185
{% endhighlight %}
189186

190187
{% endtabs %}
191188

192189
![Customize EmptyPoints in MAUI Chart](EmptyPoints_images\Customize_EmptyPoints.png)
193190

194-
N> The EmptyPoints feature is not supported for Histogram and BoxAndWhisker series.
191+
N> EmptyPoint support is not applicable for Histogram and BoxAndWhisker series.
3.21 KB
Loading
1.3 KB
Loading
1.18 KB
Loading
3.73 KB
Loading

maui-toolkit/Cartesian-Charts/FastScatter.md

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Keywords: .net maui fast scatter chart, .net maui performance scatter chart, fas
1010

1111
# Fast Scatter in .NET MAUI Chart
1212

13-
The **FastScatterSeries** is a specialized scatter series designed to efficiently render a large number of data points. To render a fast scatter chart, create an instance of **FastScatterSeries**, and add it to the [Series](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.SfCartesianChart.html#Syncfusion_Maui_Toolkit_Charts_SfCartesianChart_Series) collection property of [SfCartesianChart](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.SfCartesianChart.html).
13+
The [FastScatterSeries](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.FastScatterSeries.html) is a specialized scatter series designed to efficiently render a large number of data points. To render a fast scatter chart, create an instance of [FastScatterSeries](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.FastScatterSeries.html), and add it to the [Series](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.SfCartesianChart.html#Syncfusion_Maui_Toolkit_Charts_SfCartesianChart_Series) collection property of [SfCartesianChart](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.SfCartesianChart.html).
1414

15-
The **PointHeight** and **PointWidth** properties in the FastScatterSeries control the height and width of scatter segments. The **Type** property allows you to change the rendering shape of the **FastScatterSeries**.
15+
The [PointHeight](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.FastScatterSeries.html#Syncfusion_Maui_Toolkit_Charts_FastScatterSeries_PointHeight) and [PointWidth](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.FastScatterSeries.html#Syncfusion_Maui_Toolkit_Charts_FastScatterSeries_PointWidth) properties in the FastScatterSeries control the height and width of scatter segments. The [Type](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.FastScatterSeries.html#Syncfusion_Maui_Toolkit_Charts_FastScatterSeries_Type) property allows you to change the rendering shape of the [FastScatterSeries](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.FastScatterSeries.html).
1616

1717
N> The Cartesian chart has [Series](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.SfCartesianChart.html#Syncfusion_Maui_Toolkit_Charts_SfCartesianChart_Series) as its default content.
1818

@@ -21,19 +21,23 @@ N> The Cartesian chart has [Series](https://help.syncfusion.com/cr/maui-toolkit/
2121
{% highlight xaml %}
2222

2323
<chart:SfCartesianChart>
24-
<chart:SfCartesianChart.XAxes>
25-
<chart:NumericalAxis/>
26-
</chart:SfCartesianChart.XAxes>
27-
28-
<chart:SfCartesianChart.YAxes>
29-
<chart:NumericalAxis/>
30-
</chart:SfCartesianChart.YAxes>
31-
32-
<chart:FastScatterSeries ItemsSource="{Binding Data}"
33-
XBindingPath="XValue"
34-
YBindingPath="YValue"
35-
PointHeight="8"
36-
PointWidth="8"/>
24+
25+
<chart:SfCartesianChart.XAxes>
26+
<chart:NumericalAxis/>
27+
</chart:SfCartesianChart.XAxes>
28+
29+
<chart:SfCartesianChart.YAxes>
30+
<chart:NumericalAxis/>
31+
</chart:SfCartesianChart.YAxes>
32+
33+
<chart:FastScatterSeries ItemsSource="{Binding Data1}"
34+
XBindingPath="XValue"
35+
YBindingPath="YValue" />
36+
37+
<chart:FastScatterSeries ItemsSource="{Binding Data2}"
38+
XBindingPath="XValue"
39+
YBindingPath="YValue" />
40+
3741
</chart:SfCartesianChart>
3842

3943
{% endhighlight %}
@@ -48,16 +52,22 @@ chart.XAxes.Add(primaryAxis);
4852
NumericalAxis secondaryAxis = new NumericalAxis();
4953
chart.YAxes.Add(secondaryAxis);
5054

51-
FastScatterSeries series = new FastScatterSeries()
55+
FastScatterSeries scatterSeries1 = new FastScatterSeries
56+
{
57+
ItemsSource = new ViewModel().Data1,
58+
XBindingPath = "XValue",
59+
YBindingPath = "YValue",
60+
};
61+
62+
FastScatterSeries scatterSeries2 = new FastScatterSeries
5263
{
53-
ItemsSource = new ViewModel().Data,
54-
XBindingPath = "XValue",
55-
YBindingPath = "YValue",
56-
PointHeight = 8,
57-
PointWidth = 8,
64+
ItemsSource = new ViewModel().Data2,
65+
XBindingPath = "XValue",
66+
YBindingPath = "XValue",
5867
};
5968

60-
chart.Series.Add(series);
69+
chart.Series.Add(scatterSeries1);
70+
chart.Series.Add(scatterSeries2);
6171
this.Content = chart;
6272

6373
{% endhighlight %}
7.2 KB
Loading

0 commit comments

Comments
 (0)