Articles in this section

How to Create a Dotted Line Chart in .NET MAUI Polar Chart?

The Syncfusion® .NET MAUI Polar Chart supports various series types, including the PolarLineSeries, which can be customized to display a dotted line for enhanced visual representation. This article provides a step-by-step guide on how to create a dotted polar line chart in .NET MAUI.

Step 1: Initialize SfPolarChart
Set up the SfPolarChart according to the guidelines in the documentation.

Step 2: Create Dotted Polar Line
To create a dotted polar line effect in the Polar Chart, use the StrokeDashArray property in the PolarLineSeries. This property allows you to define the pattern of dashes and gaps in the line.

XAML

<chart:SfPolarChart>
        ....
<chart:PolarLineSeries  ItemsSource="{Binding PlantDetails}"
                       XBindingPath="Direction"
                       YBindingPath="Tree" 
                       ShowMarkers="True" StrokeDashArray="3,3" />
                       
<chart:PolarLineSeries  ItemsSource="{Binding PlantDetails}"
                       XBindingPath="Direction"                                                  
                       YBindingPath="Weed" 
                       ShowMarkers="True" StrokeDashArray="3,3"/>
</chart:SfPolarChart> 

C#

SfPolarChart chart = new SfPolarChart();
...
var viewModel = new PlantViewModel();
PolarLineSeries treeSeries = new PolarLineSeries()
{
   ItemsSource = viewModel.PlantDetails,
   XBindingPath = "Direction",
   YBindingPath = "Tree",
   StrokeDashArray = new DoubleCollection() { 3, 3 },
   ShowMarkers = true
};

PolarLineSeries weedSeries = new PolarLineSeries()
{
   ItemsSource = viewModel.PlantDetails,
   XBindingPath = "Direction",
   YBindingPath = "Weed",
   StrokeDashArray = new DoubleCollection() { 3, 3 }, 
   ShowMarkers = true
};

chart.Series.Add(treeSeries); 
chart.Series.Add(weedSeries); 
this.Content = chart;

Output

VisulaizeDottedPolarLine.png

Conclusion:
I hope you enjoyed learning how to create a dotted line chart in .NET MAUI Polar Chart.

Refer to our .NET MAUI Polar Chart feature tour page to know about its other groundbreaking feature representations. You can also explore our .NET MAUI Polar Chart documentation to understand how to present and manipulate data.

For current customers, you can check out our .NET MAUI components from the License and Downloads page. If you are new to Syncfusion®, try our 30-day free trial to check out our .NET MAUI Chart and other .NET MAUI components.

Please let us know in the comments section if you have any queries or require clarification. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied