MPAndroidChart icon indicating copy to clipboard operation
MPAndroidChart copied to clipboard

X-Axis Multiple Line Labels

Open rohfosho opened this issue 7 years ago • 13 comments

image

I want to display my X Axis this way, I need to render two lines of text with different text sizes.

rohfosho avatar Feb 07 '18 21:02 rohfosho

I am also trying to do the same.Can anyone help?

sushmagiri avatar Feb 10 '18 06:02 sushmagiri

yes.. only PhilJay helps for that. @sushmagiri

Akshay2693 avatar Feb 14 '18 11:02 Akshay2693

Is it done ? @Rohfosho @sushmagiri if you can help it would be greatt.

Deepak111992 avatar Apr 10 '18 10:04 Deepak111992

@Rohfosho @sushmagiri @Akshay2693 Do you realize the way like this? can you help me ?

SmallYQ avatar May 18 '18 10:05 SmallYQ

There's a PR for multiline axis labels https://github.com/PhilJay/MPAndroidChart/pull/3190 However it does not support different fonts/font sizes.

RobertZagorski avatar May 18 '18 11:05 RobertZagorski

HHMMM... a very nice improvement this is!

But I wonder what the best way to solve this is. I've already closed another PR which just split single strings into lines by \n characters, but that doesn't offer much more customization. I'll look into this further and see if I can think up a better solution than just adding support for \n in strings.

almic avatar May 19 '18 16:05 almic

HHMMM... a very nice improvement this is!

But I wonder what the best way to solve this is. I've already closed another PR which just split single strings into lines by \n characters, but that doesn't offer much more customization. I'll look into this further and see if I can think up a better solution than just adding support for \n in strings.

Customization is possible with Spannables and you can do quite a lot with them. Problem is that all labels returns String, but should CharSequence. To replace all String with CharSequence is non-breaking change, so I think this shouldn't be a problem.

zokipirlo avatar Apr 19 '19 08:04 zokipirlo

Any update on this?

samG4 avatar Sep 11 '19 08:09 samG4

+1

c-goettert avatar Jun 08 '20 15:06 c-goettert

+1

liu731 avatar Oct 22 '20 12:10 liu731

+1

levinzonr avatar Nov 30 '20 14:11 levinzonr

+1

BMarton avatar Dec 04 '20 11:12 BMarton

+1

raheemadamboev avatar Mar 04 '25 10:03 raheemadamboev