Search Results for

    Show / Hide Table of Contents

    Axis 3D APIs

    There are several axis types in SciChart Android 3D. The IAxis3D are the logical representation of the XZ, ZY, YX planes in the Axis Cube.

    Axes are required to measure the IRenderableSeries3D, for instance, an axis is responsible for the transformation between data-values (provided by your code) and world coordinates (X, Y, Z values in 3D Space).

    Note

    It is necessary to declare all X, Y and Z Axes in code before the 3D chart will draw. They are accessible via the following properties:

    • xAxis
    • yAxis
    • zAxis

    A list of the 3D axis types are found below:

    • NumericAxis3D
    • LogarithmicNumericAxis3D
    • DateAxis3D

    All the 3D axis types in SciChart conforms to the IAxis3D protocol.

    NumericAxis3D

    The NumericAxis3D is a Value-Axis and is suitable when the data type on that axis is numeric (e.g. double, int, long, float, short). It is not suitable for non-numeric data types such as Android Date.

    To create and configure a NumericAxis3D, use the following code:

    • Java
    • Java with Builders API
    • Kotlin
    final NumericAxis3D axis = new NumericAxis3D();
    axis.setGrowBy(new DoubleRange(0.1, 0.1));
    axis.setVisibleRange(new DoubleRange(-7.0, 7.0));
    
    final NumericAxis3D axis = sciChart3DBuilder.newNumericAxis3D()
            .withGrowBy(new DoubleRange(0.1, 0.1))
            .withVisibleRange(new DoubleRange(-7.0, 7.0))
            .build();
    
    val axis = NumericAxis3D()
    axis.growBy = DoubleRange(0.1, 0.1)
    axis.visibleRange = DoubleRange(-7.0, 7.0)
    

    LogarithmicNumericAxis3D

    The LogarithmicNumericAxis3D is a Value axis which uses non-linear (logarithmic) scale. It is suitable when the data is numeric (e.g. double, int, long, float, short). It is not suitable for non-numeric data types such as Android Date.

    Note

    The LogarithmicNumericAxis3D cannot render data values less than or equal to zero. Please ensure you append valid data to your DataSeries.

    To create and configure a LogarithmicNumericAxis3D, use the following code:

    • Java
    • Java with Builders API
    • Kotlin
    final LogarithmicNumericAxis3D axis = new LogarithmicNumericAxis3D();
    axis.setGrowBy(new DoubleRange(0.1, 0.1));
    axis.setVisibleRange(new DoubleRange(0.1, 1000.0));
    
    // Specifies how labels appear on the axis
    axis.setScientificNotation(ScientificNotation.LogarithmicBase);
    axis.setCursorTextFormatting("#.#E+0");
    
    // Specifies the logarithm base for the logarithmic scale of the axis
    axis.setLogarithmicBase(10.0);
    
    final LogarithmicNumericAxis3D axis = sciChart3DBuilder.newLogarithmicNumericAxis3D()
            .withGrowBy(new DoubleRange(0.1, 0.1))
            .withVisibleRange(new DoubleRange(0.1, 1000.0))
            // Specifies how labels appear on the axis
            .withScientificNotation(ScientificNotation.LogarithmicBase)
            .withTextFormatting("#.#E+0")
            // Specifies the logarithm base for the logarithmic scale of the axis
            .withLogarithmicBase(10.0)
            .build();
    
    val axis = LogarithmicNumericAxis3D()
    axis.growBy = DoubleRange(0.1, 0.1)
    axis.visibleRange = DoubleRange(0.1, 1000.0)
    
    // Specifies how labels appear on the axis
    axis.scientificNotation = ScientificNotation.LogarithmicBase
    axis.cursorTextFormatting = "#.#E+0"
    
    // Specifies the logarithm base for the logarithmic scale of the axis
    axis.logarithmicBase = 10.0
    

    DateAxis3D

    The DateAxis3D is a Value axis, which is designed to work with dates only.

    Note

    The DateAxis3D is not suitable for numeric data types.

    To create and configure a DateAxis3D, use the following code:

    • Java
    • Java with Builders API
    • Kotlin
    final DateAxis3D axis = new DateAxis3D();
    axis.setAutoRange(AutoRange.Always);
    axis.setGrowBy(new DoubleRange(0.1, 0.1));
    axis.setVisibleRange(new DateRange(dateMin, dateMax));
    
    final DateAxis3D axis = sciChart3DBuilder.newDateAxis3D()
            .withAutoRangeMode(AutoRange.Always)
            .withGrowBy(new DoubleRange(0.1, 0.1))
            .withVisibleRange(dateMin, dateMax)
            .build();
    
    val axis = DateAxis3D()
    axis.autoRange = AutoRange.Always
    axis.growBy = DoubleRange(0.1, 0.1)
    axis.visibleRange = DateRange(dateMin, dateMax)
    
    Note

    To learn more about how to convert values from Dates to Indexes and back, please refer to the Convert Pixels to Data Coordinates article.

    See the Axis 3D Types in action

    Please take a look at the examples from the Android Examples Suite listed below to see these axis 3D types in action:

    • Android 3D Custom Free Surface Chart with NumericAxis3D
    • Android 3D Logarithmic Axis with LogarithmicNumericAxis3D
    • Android 3D Date Axis3D with DateAxis3D
    Back to top © 2011-2025 SciChart. All rights reserved. | sitemap.xml