0

I am working and android chart library using MPAndroidChart .

I am using HorizontalBarChart to display chart.

Please see the attached image and I want do decrease x axis width or want to display x axis text in two lines is there any way to this ?enter image description here

Any help will get appreciate.

David Rawson
  • 20,912
  • 7
  • 88
  • 124
bhavesh kaila
  • 761
  • 1
  • 5
  • 25
  • I have no idea what you are asking or what result you want to achieve, – zyamys Mar 25 '16 at 20:27
  • This question now has an answer here: [In MPAndroidChart Library, How to wrap X Axis Labels to two lines when long?](http://stackoverflow.com/questions/32509174/in-mpandroidchart-library-how-to-wrap-x-axis-labels-to-two-lines-when-long) – David Rawson Feb 11 '17 at 03:34

1 Answers1

1

There is currently no way to draw the x-axis labels in multiple lines.

What you can do to decrease the space the labels consume is to simply provide shorter labels. A axis label of the length you are showing above is too long for a chart to be easily readable anyway.

Philipp Jahoda
  • 50,880
  • 24
  • 180
  • 187
  • 1
    can you please add this options to library I tried to change it using `\n`but its not working. – bhavesh kaila Mar 29 '16 at 04:43
  • @bhaveshkaila did you get any workaround? I am facing same issue, and tried with `\n` but not working... Interesting is that, `\n` is working with ios mpchart library :-) – Kushal May 23 '17 at 12:49