PhilJay / MPAndroidChart

A powerful 🚀 Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, panning and animations.
Other
37.52k stars 9.01k forks source link

Customizing data labels #4084

Open francisnnumbi opened 6 years ago

francisnnumbi commented 6 years ago

I'm using the latest library version. I'm using grouped bar chart. Which is working perfectly.

But the issue is that default labels are number. Mine should be days of the week, as displayed data represent the last 7 days.

I find no way to change labels from int to string.

RobertZagorski commented 6 years ago

Just set your custom IAxisValueFormatter to the chart and write interpreter of numbers to days names in callback. Of course you need to ensure, that range of X-values is appropraite There is no value to implement such feature in the library as it's scope of usage is very limited.