Skip to content

Why does AxisBase.setLabelCount has a maximum value ? And why 25 ? #2642

@philippeauriach

Description

@philippeauriach

AxisBase.setLabelCount put a maximum of 25 labels. Why this limit ? How has it been decided ?

public void setLabelCount(int count) {

     if (count > 25)
         count = 25;
     if (count < 2)
         count = 2;

     mLabelCount = count;
     mForceLabels = false;
 }

I'm trying to have only specific labels displayed on xAxis (one every two points, starting at the second data point), so I was going to tell the axis I have 52 labels (the number of points in my case, from 0 to 51), and then in my custom axisFormatter, return empty string for labels that should not be shown. Is there an easier way ?

In other word, I want to specifically tell the graph to show a label for one (or several) x points, by deciding which x point (not having it automatically chosen by the lib).

thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions