react-native-pathjs-charts icon indicating copy to clipboard operation
react-native-pathjs-charts copied to clipboard

Show every # Ticks on Bar Chart

Open VanessaChu opened this issue 7 years ago • 3 comments

Is there a way to show every 5 ticks on the bar chart on the x-axis?

For example 30 sets of datas only show 5, 10, 15, 20, 25, 30 labels on x-axis

Thank you

VanessaChu avatar Jan 05 '18 22:01 VanessaChu

@VanessaChu, you just need to pass a tickCount (quantity of the ticks on the axis you want) as an options property of the x-axis as:

let options = {
  axisX: {
    tickCount: 15,
    ...
  },
  axisY: {
    ...
  }
};

UladzimirKuzmin avatar Jan 07 '18 22:01 UladzimirKuzmin

This didn't work for the bar graph. :(

VanessaChu avatar Jan 08 '18 19:01 VanessaChu

Unfortunately no, there is no current support for this use case.

marzolfb avatar Jan 10 '18 07:01 marzolfb