Search Results for

    Show / Hide Table of Contents

    Axis Labels - Rotation

    Axis label rotation allows you to adjust the angle of the text labels on the chart axes. This is particularly useful when dealing with charts that have long labels, or when labels overlap, making it difficult to read the data points clearly. By rotating the labels, you can improve the overall aesthetics and readability of your charts.

    Axis Labels Formatting

    Axis API allows to rotate axis label. There is the setAxisLabelRotation(Integer axisLabelRotation) property for this. Such axis label rotation can be set in code as shown below:

    • Java
    • Java with Builders API
    • Kotlin
    final NumericAxis xAxis = new NumericAxis(getContext());
    xAxis.setAxisLabelRotation(30); // Rotate 30 degrees
    
    final NumericAxis yAxis = new NumericAxis(getContext());
    yAxis.setAxisLabelRotation(-30); // You can also rotate in other direction
    
    final NumericAxis xAxis = new NumericAxis(getContext());
    xAxis.setAxisLabelRotation(30); // Rotate 30 degrees
    
    final NumericAxis yAxis = new NumericAxis(getContext());
    yAxis.setAxisLabelRotation(-30); // You can also rotate in other direction
    
    val xAxis = NumericAxis(context)
    xAxis.axisLabelRotation = 30 // Rotate 30 degrees
    
    val yAxis = NumericAxis(context)
    yAxis.axisLabelRotation = -30 // You can also rotate in other direction
    

    Axis Labels - Axis size (width or height)

    Adjusting the axis width gives you control over the thickness of the axis lines on your chart. This feature is useful for emphasizing certain data points, creating a more polished look, or ensuring that your chart's axes are proportionate to other graphical elements. Changing the axis width can help make your charts more visually appealing and easier to interpret.

    Axis Labels Formatting

    Axis API allows to set axis size. There is the setFixedSize(Integer fixedSize) property for this. Such axis size can be set in code as shown below:

    • Java
    • Java with Builders API
    • Kotlin
    final NumericAxis xAxis = new NumericAxis(getContext());
    xAxis.setFixedSize(200); // Set height of the horizontal axis to 200
    
    final NumericAxis yAxis = new NumericAxis(getContext());
    yAxis.setFixedSize(200); // Set width of the vertical axis to 200
    
    final NumericAxis xAxis = new NumericAxis(getContext());
    xAxis.setFixedSize(200); // Set height of the horizontal axis to 200
    
    final NumericAxis yAxis = new NumericAxis(getContext());
    yAxis.setFixedSize(200); // Set width of the vertical axis to 200
    
    val xAxis = NumericAxis(context)
    xAxis.fixedSize = 200 // Set height of the horizontal axis to 200
    
    val yAxis = NumericAxis(context)
    yAxis.fixedSize = 200 // Set width of the vertical axis to 200
    
    Back to top © 2011-2025 SciChart. All rights reserved. | sitemap.xml