From 7c66cd9a42ee01ac638510e648ad83d2a3dd0bb8 Mon Sep 17 00:00:00 2001 From: "tineshkumar.sf4652" Date: Wed, 19 Mar 2025 16:33:57 +0530 Subject: [PATCH] Align the code snippets --- maui-toolkit/Cartesian-Charts/EmptyPoints.md | 140 +++++++++---------- maui-toolkit/Cartesian-Charts/FastScatter.md | 69 ++++----- 2 files changed, 105 insertions(+), 104 deletions(-) diff --git a/maui-toolkit/Cartesian-Charts/EmptyPoints.md b/maui-toolkit/Cartesian-Charts/EmptyPoints.md index a838d43e..d1b68eb6 100644 --- a/maui-toolkit/Cartesian-Charts/EmptyPoints.md +++ b/maui-toolkit/Cartesian-Charts/EmptyPoints.md @@ -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(); - 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(); +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 %} @@ -47,34 +47,34 @@ The following code example shows the [EmptyPointMode](https://help.syncfusion.co {% highlight xaml %} - + - ..... - - + - + {% 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 %} @@ -88,34 +88,34 @@ The following code example shows the [EmptyPointMode](https://help.syncfusion.co {% highlight xaml %} - + - ..... - - + - + {% 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 %} @@ -134,10 +134,10 @@ The [EmptyPointSettings](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion. {% highlight xaml %} - + - ..... - - - - - + + + + - + {% 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 %} @@ -188,4 +188,4 @@ The [EmptyPointSettings](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion. ![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. \ No newline at end of file diff --git a/maui-toolkit/Cartesian-Charts/FastScatter.md b/maui-toolkit/Cartesian-Charts/FastScatter.md index a11edea3..7f3023c1 100644 --- a/maui-toolkit/Cartesian-Charts/FastScatter.md +++ b/maui-toolkit/Cartesian-Charts/FastScatter.md @@ -20,54 +20,55 @@ N> The Cartesian chart has [Series](https://help.syncfusion.com/cr/maui-toolkit/ {% highlight xaml %} - - - - + - - - + + + - + + + - + - + + + {% 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 %}