Enum TickLabelPositionType

TickLabelPositionType enumeration

Represents the position type of tick-mark labels on the specified axis.

public enum TickLabelPositionType

Values

NameValueDescription
High0Position type is high.
Low1Position type is low.
NextToAxis2Position type is next to axis.
None3Position type is none.

Examples

namespace AsposeCellsExamples
{
    using Aspose.Cells;
    using Aspose.Cells.Charts;
    using System;

    public class TickLabelPositionTypeDemo
    {
        public static void TickLabelPositionTypeExample()
        {
            // Create a new workbook
            Workbook workbook = new Workbook();
            
            // Add a new worksheet to the workbook
            Worksheet worksheet = workbook.Worksheets[0];
            
            // Add some sample data to the worksheet
            worksheet.Cells["A1"].PutValue(50);
            worksheet.Cells["A2"].PutValue(100);
            worksheet.Cells["A3"].PutValue(150);
            worksheet.Cells["B1"].PutValue(4);
            worksheet.Cells["B2"].PutValue(20);
            worksheet.Cells["B3"].PutValue(50);
            
            // Add a chart to the worksheet
            int chartIndex = worksheet.Charts.Add(ChartType.Column, 5, 0, 25, 5);
            Chart chart = worksheet.Charts[chartIndex];
            
            // Add NSeries (chart data source) to the chart ranging from "A1" cell to "B3"
            chart.NSeries.Add("A1:B3", true);
            
            // Access the category axis
            Axis categoryAxis = chart.CategoryAxis;
            
            // Set the tick label position to High
            categoryAxis.TickLabelPosition = TickLabelPositionType.High;
            
            // Save the workbook
            workbook.Save("TickLabelPositionTypeExample.xlsx");
        }
    }
}

See Also