capitalone / react-native-pathjs-charts

Android and iOS charts based on react-native-svg and paths-js
Apache License 2.0
879 stars 261 forks source link

Show every # Ticks on Bar Chart #219

Open VanessaChu opened 6 years ago

VanessaChu commented 6 years ago

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

UladzimirKuzmin commented 6 years ago

@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: {
    ...
  }
};
VanessaChu commented 6 years ago

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

marzolfb commented 6 years ago

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