Create A Line Chart Showing U.S. Egg Prices More Than Twice In 2022

Updated on May 30, 2025
line-chart maui maui-chart maui-line-chart

The national average price for a dozen large Grade A eggs has more than doubled from $1.93 in January to $4.25 in December 2022. This sample demonstrates how to create a line chart in .NET MAUI (SfCartesianChart) showing U.S. egg prices more than twice in 2022.

Line chart customization

The StrokeDashArray property of LineSeries is used to render the line series with dashes. Odd value is considered as rendering size and even value is considered as gap.

Line data marker customization

We can customize the series markers appearance by creating an instance of the MarkerSettings property.

Plot area customization for line chart

SfCartesianChart allows you to add any view to the chart plot area using PlotAreaBackgroundView property, which is useful for adding any relevant data, a watermark, or a color gradient to the background of the chart

line-chart

For a step by step procedure, refer to the U.S Egg Prices Chart.