indiespirit / react-native-chart-kit

đź“ŠReact Native Chart Kit: Line Chart, Bezier Line Chart, Progress Ring, Bar chart, Pie chart, Contribution graph (heatmap)

Home Page:https://expo.io/@indiespirit/react-native-chart-kit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Limiting number of values in x-axis

uhfonso opened this issue · comments

commented

Hi, I would like to know if there is a way to limit the number of points i want to display on the X-axis label. Please let me know if there is any possible way.

Thanks!

commented

Did you find a solution? I am trying a way to limit the values on the y axis

do something like this

let labelIndex = 0;
let skipLabelEvery = 3;

then use formatXLabel prop

      formatXLabel={(value) => {
        labelIndex++;
        return labelIndex % skipLabelEvery === 0  ? value : "";
      }}