Here, we look at all the typical ways you need to customize your chart’s axis using FlexChart. FlexChart is a cross-platform .NET component supported in WinForms, WPF, UWP, Xamarin, ASP.NET MVC, and Blazor (as of 2020 v2). There’s even a JavaScript version.

The API is mostly the same for each platform as it enables flexible customization of the chart axis. Configure the axis line visibility, labels, tick marks, gridlines, title and position. You can also create logarithmic axis scales, add multiple axes along the same scale, reverse the axis and more.

In this post, we cover:

  • Display or hide the chart axis line
  • Display axis titles
  • Manage overlapped axis labels
  • Display staggered axis labels (New)
  • Format axis labels
  • Configure tick marks, gridlines and intervals
  • Configure hierarchical axis grouping (New)
  • Change the axis scale
  • Enable axis scrollbars (New)
  • Plotting multiple axes

Display or Hide the Chart Axis Line

FlexChart does not display the vertical axis line by default because it follows modern style trends that emphasize minimal design. This behavior can be changed by setting the AxisLine property of either axis to true or false.

The following snippet makes the y-axis visible in FlexChart:

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

Figure 1 - Hide the chart axis line

Display C## Chart Axis Titles

All chart axes can be identified by a title that helps clarify the values being plotted. In FlexChart this can be done by setting the Title property of either axis. You can also customize the title’s font and color using the TitleStyle property.

#web #mobile #.net #c#

Customize C# Chart Options - Axis, Labels, Grouping, Scrolling, and More
1.65 GEEK