Is it possible to set a UILabel into a horizontal bar of a bar chart? (CorePlot)
Thank you!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you just need to label one of the bars, you can use a
CPTPlotSpaceAnnotation. Set theanchorPlotPointto a point in the bar (exactly where depends on how you want to align the label). Make aCPTTextLayerthat contains the desired text and set that as the content layer for the annotation. Add the annotation to the plot.If you want to label all (or most) of the bars, use data labels. Set the label offset to a negative value to push the labels inside the bars.