Click or drag to resize

IChartCategoryAxis TickMarkSpacing Property

Represents the number of categories or series between tick marks.
Examples
The following code illustrates how to set TickMarkSpacing for chart axis:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Create chart and set range</para><para>IChart chart = worksheet.Charts.Add();</para><para>chart.DataRange = worksheet.Range["A1:F2"];</para><para>//Set chart category axis</para><para>IChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;</para><para>//Set tick mark spacing</para><para>categoryAxis.TickMarkSpacing = 2;</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>

Namespace: Spire.Xls.Core
Assembly: Spire.XLS (in Spire.XLS.dll) Version: 15.4.0.0 (15.4.0.5046)
Syntax
int TickMarkSpacing { get; set; }

Property Value

Type: Int32
See Also