---
title: "Chart of the Week: Creating a .NET MAUI Column Chart to Visualize Top Insurance Companies"
published_at: "2023-12-06T12:04:44+00:00"
modified_at: "2026-01-15T08:29:24+00:00"
url: "https://www.syncfusion.com/blogs/post/dotnet-maui-column-chart-insurance"
excerpt: "This blog explains how to visualize the data on the USA’s insurance companies using the Syncfusion .NET MAUI Column Chart."
taxonomy_category:
  - ".NET MAUI"
  - "Chart"
  - "Chart of the week"
  - "Desktop"
  - "Mobile"
  - "Syncfusion"
taxonomy_post_tag:
  - ".NET MAUI"
  - "Charts"
  - "desktop"
  - "MAUI"
  - "Mobile"
---

[Chart of the week](https://www.syncfusion.com/blogs/category/chart-of-the-week)
# Chart of the Week: Creating a .NET MAUI Column Chart to Visualize Top Insurance Companies

[Sowndharya Selladurai](https://www.syncfusion.com/blogs/author/sowndharya-selladurai)

![Chart of the Week Creating a .NET MAUI Column Chart to Visualize Top Insurance Companies](https://www.syncfusion.com/blogs/wp-content/uploads/2023/12/Chart-of-the-Week-Creating-a-.NET-MAUI-Column-Chart-to-Visualize-Top-Insurance-Companies-1.png)


Welcome to our**Chart of the Week** blog series!

Today, we’ll create a customized column chart to visualize the top insurance companies in the USA using the [Syncfusion .NET MAUI Column Chart](https://www.syncfusion.com/maui-controls/maui-cartesian-charts/chart-types/maui-column-chart)
. This control is supported on desktop (Windows and Mac) and mobile platforms (Android and iOS).

A column chart is a data visualization tool where categories are represented in the form of vertical columns. In this case, the column chart has been customized to represent the top insurance companies in the USA based on their 2022 market capitalization.

![Visualizing data of the USA’s top insurance companies using the Syncfusion .NET MAUI Column Chart](https://www.syncfusion.com/blogs/wp-content/uploads/2023/12/Visualizing-data-of-the-USAs-top-insurance-companies-using-the-Syncfusion-.NET-MAUI-Column-Chart.png)Let’s get started!

## Step 1: Collect data on top insurance companies

First, let’s gather data on the names of the leading insurance companies in the USA and their corresponding market capitalizations for the year 2022 from the [CompaniesMarketCap website](https://companiesmarketcap.com/insurance/largest-insurance-companies-by-market-cap/)
. Click on each company’s name to retrieve the yearly market capitalization data and collect the values for the year 2022.

## Step 2: Prepare data for the chart

Create an **InsuranceCompany** model class that includes properties for storing information about companies and their market capitalization in the USA.

Refer to the following code example.

```
public class InsuranceCompany
{
    public string CompaniesName { get; set; }
    public double MarketCapitalization { get; set; }

    public InsuranceCompany(string name, double capitalization)
    {
        CompaniesName = name;
        MarketCapitalization = capitalization;
    }
}
```

Next, configure the **ViewModel** class to create a collection of insurance companies along with their market capitalizations and store it in an observable collection using the ** InsuranceCompaniesList** property.

Refer to the following code example.

```
public class InsuranceCompaniesViewModel
{
    public ObservableCollection<InsuranceCompany> InsuranceCompaniesList { get; set; }

    public InsuranceCompaniesViewModel()
    {
        InsuranceCompaniesList = new ObservableCollection<InsuranceCompany>
        {
             new InsuranceCompany("Elevance Health",123.11),
             new InsuranceCompany("Cigna",101.30),
             new InsuranceCompany("Marsh&MC Lennan",82.07),
             new InsuranceCompany("Progressive",75.88),
             new InsuranceCompany("Humana",64.84),
             new InsuranceCompany("MetLife",56.78),
             new InsuranceCompany("American International",46.98),
             new InsuranceCompany("Arthur J.Gallagher",39.75),           
         };
    }
}
```

## Step 3: Define layout

Define the layout using a **Border** element. Inside the border, utilize a ** Grid** to place the chart elements.

Refer to the following code example.

```
<Border StrokeShape="RoundRectangle 20" 
                StrokeThickness="4"
                Stroke="Gray"
                Margin="20">

<Grid RowDefinitions="2*,8*">

<!--Align Header-->
<Grid Grid.Row="0"
         ColumnDefinitions="50,*" RowDefinitions="50,*">
</Grid>

</Grid>
</Border>
```

## Step 4: Configuring the Syncfusion .NET MAUI Charts

Let’s configure the Syncfusion .NET MAUI Cartesian Charts control using this [documentation](https://help.syncfusion.com/maui/cartesian-charts/getting-started)
.

Refer to the following code example.

```
<chart:SfCartesianChart Grid.Row="1">

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

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

## Step 5: Bind data to the chart

Use Syncfusion’s [ColumnSeries](https://help.syncfusion.com/maui/cartesian-charts/column)
 instance to visualize the list of top insurance companies. In this case, we want a customized column chart. Therefore, in the code behind, initialize the column chart and segment accordingly.

Refer to the following code example.

```
public class ColumnSeriesExt : ColumnSeries
{

} 
public class ColumnSegmentExt : ColumnSegment
{

}
```

Utilize a customized column instance to bind the data to the chart. Bind the **InsuranceCompaniesList** collection to the ** ItemSource**property. The ** XBindingPath** and ** YBindingPath** properties should be associated with the ** CompaniesName** and ** MarketCapitalization** properties, respectively. These bindings indicate the data points to be used for the x-axis and y-axis values.

```
<chart:SfCartesianChart  Grid.Row="1">
 <model:ColumnSeriesExt ItemsSource="{Binding InsuranceCompaniesList}"
                        XBindingPath="CompaniesName" 
                        YBindingPath="MarketCapitalization">
 </model:ColumnSeriesExt>
</chart:SfCartesianChart>
```

## Step 6: Customize the column chart

Refer to the following code example. In it, the **ColumnSeriesExt** class extends the standard ** ColumnSeries** and overrides the ** CreateSegment** method. This method is crucial as it dictates the creation of a custom ** ColumnSegmentExt** instance, enabling the chart to display specialized segments.

The **ColumnSegmentExt** class, which inherits from ** ColumnSegment**, holds the drawing logic for the custom column shape. The ** Draw** method within this class utilizes ** PathF** to define shapes: a rectangle with a triangle top.

```
public class ColumnSeriesExt : ColumnSeries
{
    protected override ChartSegment CreateSegment()
    {
        return new ColumnSegmentExt();
    }
}

public class ColumnSegmentExt : ColumnSegment
{
    protected override void Draw(ICanvas canvas)
    {
          // Create a path rectangle with a triangle top.
          var path = new PathF();
          path.MoveTo(Left, Bottom); 
          path.LineTo(Right, Bottom); 
          path.LineTo(Right, Top + 20); 
          path.LineTo((Left + Right) / 2, Top); 
          path.LineTo(Left, Top + 20); 
          path.Close();

          var color = (Fill is SolidColorBrush brush) ? brush.Color : Colors.Transparent;
          canvas.FillColor = color;
          canvas.FillPath(path);   
 
     }
}
```

## Step 7: Customize the chart appearance

Let’s enhance the visual appeal of the chart and its elements for better readability.

### Customizing the title

Refer to the following example to customize the chart title.

```
<!--Align Header-->
 <Grid Grid.Row="0" ColumnDefinitions="50,*" RowDefinitions="50,*">
     <Image Grid.RowSpan="1" Grid.Column="0" Source="insurancelogo.png"
                 HeightRequest="40"
                 WidthRequest="40"
                 Margin="8"/>
     <VerticalStackLayout Grid.Row="0" Grid.Column="1">
       <Label Text="Creating a Customized Column Chart for USA's Insurance Companies by Market Capitalization"
            TextColor="Black" 
            FontSize="18"
            FontFamily="TimeSpan"
            FontAttributes="Bold"
            Margin="0,5,0,0"/>

       <Label Text="List of USA insurance companies based on 2022 market capitalization data, visualized in a customized column chart."
            TextColor="Black" 
            FontSize="12"
            FontFamily="TimeSpan"
            Margin="5"/>
     </VerticalStackLayout>
 </Grid>
```

### Customizing the axes

Customize the x- and y-axes using the properties **MajorGrideLines**, ** Title**,** Text**, and** Interval**.

Refer to the following code example.

```
<chart:SfCartesianChart.XAxes>
   <chart:CategoryAxis ShowMajorGridLines="False">
     <chart:CategoryAxis.Title>
        <chart:ChartAxisTitle Text="Insurance Companies"/>
     </chart:CategoryAxis.Title>
   </chart:CategoryAxis>
</chart:SfCartesianChart.XAxes>

<chart:SfCartesianChart.YAxes>
   <chart:NumericalAxis Interval="20" IsVisible="True" />
</chart:SfCartesianChart.YAxes>
```

### Customizing the series appearance

Customize the column series using the **Fill** property.

```
<model:ColumnSeriesExt Fill="#2E97A7"> 
</model:ColumnSeriesExt> 
```

### Customizing the series data labels

Add the chart’s [data labels](https://help.syncfusion.com/maui/cartesian-charts/datalabels)
 and customize the labels as shown in the following code example.

```
<model:ColumnSeriesExt ItemsSource="{Binding InsuranceCompaniesList}"
                       XBindingPath="CompaniesName" 
                       YBindingPath="MarketCapitalization"
                       ShowDataLabels="True"
                       Fill="#2E97A7">  
  <chart:ColumnSeries.DataLabelSettings>
    <chart:CartesianDataLabelSettings LabelPlacement="Inner" BarAlignment="Middle"                                                                        UseSeriesPalette="False">
      <chart:CartesianDataLabelSettings.LabelStyle>
        <chart:ChartDataLabelStyle LabelFormat="$0.00'B" TextColor="White"/>
      </chart:CartesianDataLabelSettings.LabelStyle>
    </chart:CartesianDataLabelSettings>
  </chart:ColumnSeries.DataLabelSettings>
</model:ColumnSeriesExt>
```

After executing the previous code examples, our output will look like the following image.

![Visualizing data of the USA’s top insurance companies using the Syncfusion .NET MAUI Column Chart](https://www.syncfusion.com/blogs/wp-content/uploads/2023/12/Visualizing-data-of-the-USAs-top-insurance-companies-using-the-Syncfusion-.NET-MAUI-Column-Chart.png)

Visualizing data of the USA’s top insurance companies using the Syncfusion .NET MAUI Column Chart

## GitHub reference

For more information, refer to the project on [Github](https://github.com/SyncfusionExamples/Creating-a-Customized-Colum-Chart-for-USA-Insurance-Companies-by-Market-Capitalization)
.


## Conclusion

Thanks for reading! We’ve seen how to compare the top insurance companies in the USA based on 2022 market capitalization using the [Syncfusion .NET MAUI Column Chart](https://help.syncfusion.com/maui/cartesian-charts/column)
 control. We encourage you to follow these steps and share your thoughts on the experience in the comment section below.

If you require assistance, please don’t hesitate to contact us via our [support forum](https://www.syncfusion.com/forums)
, [support portal](https://support.syncfusion.com/)
, or [feedback portal](https://www.syncfusion.com/feedback)
. We are always happy to help you!

## Related blogs

- [Announcing .NET 8 Support for Syncfusion .NET MAUI Controls!](https://www.syncfusion.com/blogs/post/dotnet-maui-supports-dotnet-8.aspx)
- [Effortless Google Calendar Events Synchronization in .NET MAUI Scheduler](https://www.syncfusion.com/blogs/post/sync-google-calendar-dotnet-maui.aspx)
- [Revolutionize Your User Experience with a Custom Dropdown Calendar in .NET MAUI](https://www.syncfusion.com/blogs/post/custom-dropdown-calendar-maui.aspx)
- [Chart of the Week: Creating a .NET MAUI Bubble Chart to Visualize Healthcare Spending and Life Expectancy Data](https://www.syncfusion.com/blogs/post/dotnet-maui-bubble-chart-health.aspx)
