PeterK
PeterK

Reputation: 4301

Core-Plot how to format the legends, see picture

I have been trying to fix this problem but not been able to do so. I am not able to find any good examples on the web either.

I have tried rowHeightsThatFit: but don't get it to work.

I want to lay out the bottom legends on one line alternative make sure it is seen.

enter image description here

Upvotes: 1

Views: 950

Answers (1)

El Developer
El Developer

Reputation: 3346

From the CPTLegend class reference:

You will want to modify the numberOfRows attribute from the layout properties:

numberOfRows: The desired number of rows of legend entries. If zero (0) (the default), the number of rows will be automatically determined. If both numberOfRows and numberOfColumns are greater than zero but their product is less than the total number of legend entries, some entries will not be shown.

And also be careful how you set the numberOfColumns property:

numberOfColumns: The desired number of columns of legend entries. If zero (0) (the default), the number of columns will be automatically determined. If both numberOfRows and numberOfColumns are greater than zero but their product is less than the total number of legend entries, some entries will not be shown.

Upvotes: 5

Related Questions