Search code examples
javaandroidteechart

Too many labels when using datetime format on x-axis


When adding DateTime values to an Area series, the labels are repeated as shown below. How do you avoid this weirdness?

3 values, 6 labels

Should be "31/12/2012" and "01/01/2013".


Solution

  • You should set a DateTime increment for the bottom axis as explained in tutorial 4:

    tChart1.getAxes().getBottom().setIncrement(Utils.getDateTimeStep(DateTimeStep.ONEDAY));
    

    Tutorials can be found in the so called folder included with TeeChart files.