# How to Customize WinForms Chart Axis, Labels, Grouping, Scrolling and More

This tutorial shows how to customize WinForms chart axes: control visibility, labels, grouping, scaling, scrollbars, and multiple axes using a consistent cross-platform .NET API.

## Content

This tutorial shows how to customize WinForms chart axes: control visibility, labels, grouping, scaling, scrollbars, and multiple axes using a consistent cross-platform .NET API.
See how to add the NuGet package, work with the designer, bind data to the chart in C# code, and more in this video:

<iframe width="560" height="315" src="https://www.youtube.com/embed/vG2fHKZ1Q_w?si=3KarEOW243Pmp9HO" title="YouTube video player">You can also download our samples to try these features yourself in Visual Studio, or check out our interactive .NET chart demos.</iframe>

***

You can also download our samples to try these features yourself in Visual Studio, or check out our interactive desktop chart demos.

## Display or Hide the Chart Axis Line

To display the vertical axis line, set the AxisLine property of either axis to true, as shown in the code below:

```auto
flexChart.AxisY.AxisLine = true;
```

![Chart Axis Line](https://cdn.mescius.io/document-site-files/images/13ef049a-dbc7-444f-94c2-9a9cd1c2f895/f7841c3f-c4be-42f7-a753-b24edac7e2f8-20260227.3fe097.png?caption=Figure%201%20-%20Display%2FHide%20the%20chart%20axis%20line)

## Display WinForms Chart Axis Titles

Identify chart axes with titles by setting the **Title** property of either axis. Then, customize the title’s font and color using the **TitleStyle** property as shown in the code snippet below:

```auto
flexChart.AxisX.Title = "Day of Week";   
flexChart.AxisX.TitleStyle.StrokeColor = Color.Blue;   
flexChart.AxisY.Title = "Amount - In Dollars";   
flexChart.AxisY.TitleStyle.StrokeColor = Color.Blue;
```

![](https://cdn.mescius.io/document-site-files/images/13ef049a-dbc7-444f-94c2-9a9cd1c2f895/10815ccc-7b16-4102-9a22-8a252458aafe-20260227.6bf3ce.png?caption=Figure%202%20-%20Style%20the%20axis%20title)

## Manage Overlapping Axis Labels

1. Set the axis **OverlappingLabels** and **StaggeredLines** properties to configure overlapping axis label behavior as shown below:

```auto
flexChart.AxisX.OverlappingLabels = OverlappingLabels.Show;  
flexChart.AxisX.StaggeredLines = 2;
```

Overlapping options include: Show, Auto (hides to avoid overlap), Trim, and WordWrap.
![Chart Overlapping Labels](https://cdn.mescius.io/document-site-files/images/13ef049a-dbc7-444f-94c2-9a9cd1c2f895/f103c19c-b385-4560-b222-6ef46baa7d13-20260227.5ba486.png?caption=Figure%203%20-%20Overlap%20or%20stagger%20axis%20labels)

2. Set the LabelAngle property to Double.<span data-testid="definition-highlighter" class="_5pioz8co _189e1dm9 _1il9buyh _19lc184f _d0altlke" style="border-image: linear-gradient(90deg, rgb(0, 101, 255), rgb(191, 99, 243), rgb(245, 230, 168)) 0 0 100% / 1 / 0 stretch; border-width: 0px 0px 2px; border-bottom-style: solid; --_11qfq0e: solid;">NaN</span> in order to rotate labels only when necessary:

```auto
flexChart.AxisX.LabelAngle = Double.NaN;
```

![Chart Rotated Angles](https://cdn.mescius.io/document-site-files/images/13ef049a-dbc7-444f-94c2-9a9cd1c2f895/a44a6d3b-ad54-48d9-95d7-2ef5a5ad3fa2-20260227.41efbb.png?caption=Figure%204%20-%20Rotate%20axis%20labels)

## Format Axis Labels in C#

Set a .NET standard or custom format string to the **Format** property of the axis to present axis labels in a variety of formats, including dates, currency, and percentages. Common axis format strings are as follows:

| **Original Axis Label** | **Format String** | **Result** |
| ------------------- | ------------- | ------ |
| **1/1/2016** | "<span data-testid="definition-highlighter" class="_5pioz8co _189e1dm9 _1il9buyh _19lc184f _d0altlke" style="border-image: linear-gradient(90deg, rgb(0, 101, 255), rgb(191, 99, 243), rgb(245, 230, 168)) 0 0 100% / 1 / 0 stretch; border-width: 0px 0px 2px; border-bottom-style: solid; box-sizing: border-box; --_11qfq0e: solid;">MMM</span>-dd-yyyy" | Jan-01-2016 |
| **1/1/2016** | "<span data-testid="definition-highlighter" class="_5pioz8co _189e1dm9 _1il9buyh _19lc184f _d0altlke" style="border-image: linear-gradient(90deg, rgb(0, 101, 255), rgb(191, 99, 243), rgb(245, 230, 168)) 0 0 100% / 1 / 0 stretch; border-width: 0px 0px 2px; border-bottom-style: solid; box-sizing: border-box; --_11qfq0e: solid;">MMMM</span> d, yy" | January 1, 16 |
| **45000** | "c0" | $45,000 |
| **37** | "n2" | 37.00 |
| **0.987** | "p1" | 98.7% |
| **40000** | "#,K" | 40K |
| **40000000** | "#,,M" | 40M |

Some of these examples are shown in the code below:

```auto
flexChart.AxisX.Format = "MMM-dd-yyyy";   
flexChart.AxisY.Format = "C0";
```

![Chart Axis Label Formats](https://cdn.mescius.io/document-site-files/images/13ef049a-dbc7-444f-94c2-9a9cd1c2f895/ac51eaed-f9c7-4e97-a034-f12c61a7e7f3-20260227.28f67d.png)

## Configure Tick Marks, Gridlines, and Intervals

Set the following properties to configure major and minor gridlines and tick marks of chart axes:

```auto
flexChart.AxisY.MinorTickMarks = TickMark.Outside;   
flexChart.AxisY.MajorTickMarks = TickMark.Outside;  
flexChart.AxisY.MajorGrid = true;  
flexChart.AxisY.MinorGrid = false;   
flexChart.AxisY.MajorUnit = 5000;   
flexChart.AxisY.MinorUnit = 1000;   
flexChart.AxisY.MajorGridStyle.StrokeColor = Color.Red; 
```

![Chart Style axis gridlines and ticks](https://cdn.mescius.io/document-site-files/images/13ef049a-dbc7-444f-94c2-9a9cd1c2f895/da56ddde-f791-4424-a967-d70ba2773d55-20260227.6138eb.png?caption=Figure%206%20-%20Style%20axis%20gridlines%20and%20ticks)

## Configure Hierarchical Axis Grouping

1. Set the axis **GroupNames** property to the name of the field by which you are grouping as shown below:

```auto
flexChart1.AxisX.GroupNames = "Continent";
```

2. Specify a comma-separated string for the **GroupNames** property to display more than one group level on the axis.

![Chart axis grouping](https://cdn.mescius.io/document-site-files/images/13ef049a-dbc7-444f-94c2-9a9cd1c2f895/7c93909f-72c8-49e3-9b1c-2b98aad65ff6-20260227.eb8360.png?caption=Configure%20axis%20grouping)

3. Specify the **GroupItemsPath** property of the axis and FlexChart’s custom **IAxisGroupProvider** interface to provide numerical and date axis grouping.

![Chart collapsible axis grouping](https://cdn.mescius.io/document-site-files/images/13ef049a-dbc7-444f-94c2-9a9cd1c2f895/a0732704-845a-40db-9b37-bc965243a824-20260227.31f5a6.png?caption=Configure%20collapsible%20axis%20grouping)

## Change the Axis Scale

Set the axis Min and Max properties and configure a logarithmic scale by setting the **LogBase** property of the axis as shown below:

```auto
flexChart.AxisY.LogBase = 10;
```

![Chart logarithmic axes](https://cdn.mescius.io/document-site-files/images/13ef049a-dbc7-444f-94c2-9a9cd1c2f895/e1c9f537-24dc-4899-9397-bde363aba386-20260227.5181e5.png?caption=Create%20logarithmic%20axes)

## Add Axis Scrollbars for Range Scrolling

Enable a range axis scrollbar to adjust the scale of the axis and zoom into a chart using the code below.

```auto
AxisScrollbar scrollbar = new C1.Win.Chart.Interaction.AxisScrollbar(flexChart.AxisX);  
```

![chart axis scrollbars](https://cdn.mescius.io/document-site-files/images/13ef049a-dbc7-444f-94c2-9a9cd1c2f895/d9dc80de-316b-47ec-9c5f-e4e1d6d17bb7-20260227.c672d3.png?caption=Add%20chart%20axis%20scrollbars)

## Plot Multiple Axes

1. Define AxisX and AxisY properties of secondary chart axes as new Axis objects to plot a series on the secondary axes.
2. Set the axis position, customize the display by setting additional properties, and assign axes to a series to add them to the chart:

```auto
var yAxis2 = new Axis  
{  
    AxisLine = false,  
    Position = Position.Right,  
    MajorGrid = false,  
    MajorTickMarks = TickMark.None,  
    Title = "Velocity – in m/sec",  
    Format = "n0",  
};  
var series = new Series  
{  
    SeriesName = "Velocity",  
    ChartType = ChartType.Line,  
    Binding = "Velocity",  
    AxisY = yAxis2,  
};  
flexChart.Series.Add(series);
```

![Chart Plot Areas](https://cdn.mescius.io/document-site-files/images/13ef049a-dbc7-444f-94c2-9a9cd1c2f895/8411fe77-75f2-4c71-9d0e-0a883b295a00-20260227.50f9bc.png)

## WinForms Chart FAQs

### How can I customize chart axes in a WinForms application using FlexChart?

FlexChart for WinForms provides complete control over axis appearance and behavior through a consistent .NET API. Developers can show or hide axis lines, add and style titles, format labels using standard .NET date or currency formats, configure tick marks and gridlines, define custom intervals, and even apply logarithmic scaling. This flexibility ensures charts meet precise business and reporting requirements.

### How does FlexChart handle overlapping axis labels and readability issues?

FlexChart includes built-in features to prevent cluttered or overlapping axis labels when working with dense datasets. Developers can configure overlapping behavior using options like Auto, Trim, or WordWrap, apply staggered lines, or rotate labels dynamically only when necessary. These tools help maintain readability and professional presentation in dashboards, financial charts, and reporting applications.

### Can FlexChart support hierarchical grouping and multiple axes in WinForms charts?

Yes, FlexChart supports hierarchical axis grouping and multiple axes for advanced visualization scenarios. Developers can group axis values by one or more fields, implement custom grouping for numeric or date data, and add secondary axes positioned on different sides of the chart. This enables comparison of datasets with different units or scales within a single visualization.

### Does FlexChart support zooming and scrolling for large datasets?

FlexChart includes built-in range scrolling functionality that allows users to zoom and navigate large datasets interactively. By enabling an axis scrollbar, developers can let end users adjust the visible range and focus on specific data segments. This makes FlexChart especially valuable for time-series analysis, financial applications, and other data-intensive desktop solutions.

***

## Next Steps

* [Download WinForms Chart Samples](https://github.com/GrapeCity/ComponentOne-WinForms-Samples "https://github.com/GrapeCity/ComponentOne-WinForms-Samples")
* Check Out Live WinForms Chart Demos in the [ComponentOne Demo Explorer](https://developer.mescius.com/componentone/demos/explorer-download "https://developer.mescius.com/componentone/demos/explorer-download")
* [Get Started with FlexChart for WinForms](https://developer.mescius.com/videos/componentone/getting-started-with-flexchart-a-c-net-winforms-chart-control "https://developer.mescius.com/videos/componentone/getting-started-with-flexchart-a-c-net-winforms-chart-control")