FlexChart | ComponentOne
FlexChart / Working with FlexChart / FlexChart Elements / FlexChart Axis / Axes Tick Marks
In This Topic
    Axes Tick Marks
    In This Topic

    Axes tick marks are the points at which labels are plotted on the axes. In other words, they are the small marks that identify the position of items on the axes. In addition, they divide axes into equal sections by a value determined by specific properties of an axis. And their location controls the location of grid lines. 

    When it comes to axes tick marks, a chart is rendered with two types basically: major tick marks and minor tick marks. By default, FlexChart sets up X-axis with major tick marks and Y-axis with no tick marks.

    You can, however, use the MajorTickMarks and the MinorTickMarks property to manipulate the position of the major tick marks and the minor tick marks respectively.

    Both the properties can be set to any of the following TickMark enumeration values:

    Values Description
    TickMark.Cross Tick marks cross the axis.
    TickMark.Inside Tick marks appear inside the plot.
    TickMark.None Tick marks don't appear.
    TickMark.Outside Tick marks appear outside the plot.

    The GIF below displays the positioning of axes tick marks.

    You can use the following code sample to implement the above scenario:

    //Setting location for major & minor tick marks for AxisY
    flexChart.AxisY.MajorTickMarks = TickMark.Cross;
    flexChart.AxisY.MinorTickMarks = TickMark.None;
    flexChart.AxisY.TickLength = 5;
    //Setting location for major & minor tick marks for AxisX
    flexChart.AxisX.MajorTickMarks = TickMark.Outside;
    flexChart.AxisX.MinorTickMarks = TickMark.None;
    flexChart.AxisX.TickLength = 5;
    
    <c1:C1FlexChart.AxisY>
        <c1:Axis Title="Precipitation (in mm)" MajorGrid="True" MinorTickMarks="Cross" MajorTickMarks="Cross">
         </c1:Axis>
    </c1:C1FlexChart.AxisY>
    
    <c1:C1FlexChart.AxisX>
        <c1:Axis Title="Januay 2019" MajorGrid="False" MinorTickMarks="None" MajorTickMarks="Outside" Format="MMMM dd">
        </c1:Axis>
    </c1:C1FlexChart.AxisX>