Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 70 additions & 70 deletions maui-toolkit/Cartesian-Charts/EmptyPoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ The data collection that is passed to the chart can have NaN or Null values that

{% highlight C# %}

ProductSales = new ObservableCollection<Model>();
ProductSales.Add(new Model() { Product = "Electronics", Sales = 60 });
ProductSales.Add(new Model() { Product = "Clothing", Sales = 40 });
ProductSales.Add(new Model() { Product = "Groceries", Sales = double.NaN });
ProductSales.Add(new Model() { Product = "Furniture", Sales = 70 });
ProductSales.Add(new Model() { Product = "Toys", Sales = 30 });
ProductSales.Add(new Model() { Product = "Sports", Sales = double.NaN });
ProductSales.Add(new Model() { Product = "Books", Sales = 50 });
ProductSales = new ObservableCollection<Model>();
ProductSales.Add(new Model() { Product = "Electronics", Sales = 60 });
ProductSales.Add(new Model() { Product = "Clothing", Sales = 40 });
ProductSales.Add(new Model() { Product = "Groceries", Sales = double.NaN });
ProductSales.Add(new Model() { Product = "Furniture", Sales = 70 });
ProductSales.Add(new Model() { Product = "Toys", Sales = 30 });
ProductSales.Add(new Model() { Product = "Sports", Sales = double.NaN });
ProductSales.Add(new Model() { Product = "Books", Sales = 50 });

{% endhighlight %}

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

{% highlight xaml %}

<chart:SfCartesianChart>
<chart:SfCartesianChart>

.....
<chart:LineSeries ItemsSource="{Binding ProductSales}"
.....
<chart:LineSeries ItemsSource="{Binding ProductSales}"
XBindingPath="Product"
YBindingPath="Sales"
EmptyPointMode="Zero">
</chart:LineSeries>
</chart:LineSeries>

</chart:SfCartesianChart>
</chart:SfCartesianChart>

{% endhighlight %}

{% highlight c# %}

SfCartesianChart chart = new SfCartesianChart();
SfCartesianChart chart = new SfCartesianChart();

.....
LineSeries series = new LineSeries()
{
ItemsSource = new ViewModel().ProductSales,
XBindingPath = "Product",
YBindingPath = "Sales",
EmptyPointMode = EmptyPointMode.Zero
};
.....
LineSeries series = new LineSeries()
{
ItemsSource = new ViewModel().ProductSales,
XBindingPath = "Product",
YBindingPath = "Sales",
EmptyPointMode = EmptyPointMode.Zero
};

chart.Series.Add(series);
this.Content = chart;
chart.Series.Add(series);
this.Content = chart;

{% endhighlight %}

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

{% highlight xaml %}

<chart:SfCartesianChart>
<chart:SfCartesianChart>

.....
<chart:ColumnSeries ItemsSource="{Binding ProductSales}"
.....
<chart:ColumnSeries ItemsSource="{Binding ProductSales}"
XBindingPath="Product"
YBindingPath="Sales"
EmptyPointMode="Average">
</chart:ColumnSeries>
</chart:ColumnSeries>

</chart:SfCartesianChart>
</chart:SfCartesianChart>

{% endhighlight %}

{% highlight c# %}

SfCartesianChart chart = new SfCartesianChart();
SfCartesianChart chart = new SfCartesianChart();

.....
ColumnSeries series = new ColumnSeries()
{
ItemsSource = new ViewModel().ProductSales,
XBindingPath = "Product",
YBindingPath = "Sales",
EmptyPointMode = EmptyPointMode.Average
};
.....
ColumnSeries series = new ColumnSeries()
{
ItemsSource = new ViewModel().ProductSales,
XBindingPath = "Product",
YBindingPath = "Sales",
EmptyPointMode = EmptyPointMode.Average
};

chart.Series.Add(series);
this.Content = chart;
chart.Series.Add(series);
this.Content = chart;

{% endhighlight %}

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

{% highlight xaml %}

<chart:SfCartesianChart>
<chart:SfCartesianChart>

.....
<chart:LineSeries ItemsSource="{Binding ProductSales}"
.....
<chart:LineSeries ItemsSource="{Binding ProductSales}"
XBindingPath="Product"
YBindingPath="Sales"
Fill="#3068F7"
StrokeWidth="2"
ShowMarkers="True"
ShowDataLabels="True"
EmptyPointMode="Average">
<chart:LineSeries.EmptyPointSettings>
<chart:EmptyPointSettings Fill="Orange" StrokeWidth="2"/>
</chart:LineSeries.EmptyPointSettings>
</chart:LineSeries>
<chart:LineSeries.EmptyPointSettings>
<chart:EmptyPointSettings Fill="Orange" StrokeWidth="2"/>
</chart:LineSeries.EmptyPointSettings>
</chart:LineSeries>

</chart:SfCartesianChart>
</chart:SfCartesianChart>

{% endhighlight %}

{% highlight c# %}

SfCartesianChart chart = new SfCartesianChart();
SfCartesianChart chart = new SfCartesianChart();

.....
LineSeries series = new LineSeries()
{
ItemsSource = new ViewModel().ProductSales,
XBindingPath = "Product",
YBindingPath = "Sales",
Fill = Color.FromArgb("#3068F7"),
StrokeWidth = 2,
ShowMarkers = true,
ShowDataLabels = true,
EmptyPointMode = EmptyPointMode.Average
};
.....
LineSeries series = new LineSeries()
{
ItemsSource = new ViewModel().ProductSales,
XBindingPath = "Product",
YBindingPath = "Sales",
Fill = Color.FromArgb("#3068F7"),
StrokeWidth = 2,
ShowMarkers = true,
ShowDataLabels = true,
EmptyPointMode = EmptyPointMode.Average
};

EmptyPointSettings emptypointSettings = new EmptyPointSettings()
{
Fill = Colors.Orange,
StrokeWidth = 2
};
EmptyPointSettings emptypointSettings = new EmptyPointSettings()
{
Fill = Colors.Orange,
StrokeWidth = 2
};

series.EmptyPointSettings = emptypointSettings;
series.EmptyPointSettings = emptypointSettings;

chart.Series.Add(series);
this.Content = chart;
chart.Series.Add(series);
this.Content = chart;

{% endhighlight %}

{% endtabs %}

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

N> EmptyPoint support is not applicable for Histogram and BoxAndWhisker series.
N> EmptyPoint support is not applicable for Histogram and BoxAndWhisker series.
69 changes: 35 additions & 34 deletions maui-toolkit/Cartesian-Charts/FastScatter.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,54 +20,55 @@ N> The Cartesian chart has [Series](https://help.syncfusion.com/cr/maui-toolkit/

{% highlight xaml %}

<chart:SfCartesianChart>
<chart:SfCartesianChart.XAxes>
<chart:NumericalAxis/>
</chart:SfCartesianChart.XAxes>
<chart:SfCartesianChart>

<chart:SfCartesianChart.YAxes>
<chart:NumericalAxis/>
</chart:SfCartesianChart.YAxes>
<chart:SfCartesianChart.XAxes>
<chart:NumericalAxis/>
</chart:SfCartesianChart.XAxes>

<chart:FastScatterSeries ItemsSource="{Binding Data1}"
XBindingPath="XValue"
YBindingPath="YValue" />
<chart:SfCartesianChart.YAxes>
<chart:NumericalAxis/>
</chart:SfCartesianChart.YAxes>

<chart:FastScatterSeries ItemsSource="{Binding Data2}"
XBindingPath="XValue"
YBindingPath="YValue" />
<chart:FastScatterSeries ItemsSource="{Binding Data1}"
XBindingPath="XValue"
YBindingPath="YValue" />

</chart:SfCartesianChart>
<chart:FastScatterSeries ItemsSource="{Binding Data2}"
XBindingPath="XValue"
YBindingPath="YValue" />

</chart:SfCartesianChart>

{% endhighlight %}

{% highlight c# %}

SfCartesianChart chart = new SfCartesianChart();
SfCartesianChart chart = new SfCartesianChart();

NumericalAxis primaryAxis = new NumericalAxis();
chart.XAxes.Add(primaryAxis);
NumericalAxis primaryAxis = new NumericalAxis();
chart.XAxes.Add(primaryAxis);

NumericalAxis secondaryAxis = new NumericalAxis();
chart.YAxes.Add(secondaryAxis);
NumericalAxis secondaryAxis = new NumericalAxis();
chart.YAxes.Add(secondaryAxis);

FastScatterSeries scatterSeries1 = new FastScatterSeries
{
ItemsSource = new ViewModel().Data1,
XBindingPath = "XValue",
YBindingPath = "YValue",
};
FastScatterSeries scatterSeries1 = new FastScatterSeries
{
ItemsSource = new ViewModel().Data1,
XBindingPath = "XValue",
YBindingPath = "YValue",
};

FastScatterSeries scatterSeries2 = new FastScatterSeries
{
ItemsSource = new ViewModel().Data2,
XBindingPath = "XValue",
YBindingPath = "XValue",
};
FastScatterSeries scatterSeries2 = new FastScatterSeries
{
ItemsSource = new ViewModel().Data2,
XBindingPath = "XValue",
YBindingPath = "XValue",
};

chart.Series.Add(scatterSeries1);
chart.Series.Add(scatterSeries2);
this.Content = chart;
chart.Series.Add(scatterSeries1);
chart.Series.Add(scatterSeries2);
this.Content = chart;

{% endhighlight %}

Expand Down