titleLabel on multiple lines with different font on each line



I want to have the titleLabel for the graph to be displayed on two lines, one below the other and with different font styles.
To achieve this I use NSMutableAttributedString and use the line break mode to be by word wrapping.

I get the title on two lines but the text is displayed in the same font style.
Is the font for titleLabel overridden later on?



Hi nisarg,

This is a known issue due to how the styling is done on charts - currently the way to work around this is to (re)set your attributed string to the title label once the chart has rendered, which is possible to trigger using the delegate callbacks for render-finished. I’ve been taking a look at the code and we additionally hope to have this fixed for a future release :slight_smile:

Kind regards,