0

I am using MPAndroidChart library.

I have "months" of the year(JAN,FEB etc) on x-axis and some data on y-axis. I'm using a simple BarChart. The data is collected based on number of transactions carried through the app. So initially, only a single month will have data. then as time passes no of months will increase. So, intially,it's better to show only one month's data(lets say JAN). Then two months and so on. What should i do so that the only those xAxis labels are shown which have data in the corresponding y-axis?

Philipp Jahoda
  • 50,880
  • 24
  • 180
  • 187
div
  • 1,475
  • 3
  • 22
  • 32

1 Answers1

1

Take a look at the AxisValueFormatter interface.

This interface allows you to custom format the axis labels to your needs.

Philipp Jahoda
  • 50,880
  • 24
  • 180
  • 187
  • Hi @Philipp , can you please answer my bounty question regarding xAxis labels https://stackoverflow.com/questions/55325511/mpandroid-chart-not-displaying-any-labels-for-xaxis-what-is-missing?noredirect=1#comment97407907_55325511 – Deep Shah Mar 27 '19 at 04:55