Want to put graph title outside of graph area


#1

In the examples that come with the framework, the graph titles are all outside the graph area and left aligned. Mine are all centered and overlapping the graph area. I haven’t been able to find any settings for the graph title to account for the difference.

Would someone be willing to point out how to make a graph title outside of the graph area? Hoping I am missing the obvious!


#2

Hi, if you want to specify the location of the chart title, you can do so by setting the frame of the UILabel which rendes the title. You can access this label as follows:

chart.titleLabel.frame = // set your frame here

Hope that helps.


#3

There’s also these two properties which you might find useful. See the SChartTitleStyle documentation for more :slight_smile:

    _chart.theme.chartTitleStyle.position = SChartTitlePositionCenter;
    _chart.theme.chartTitleStyle.overlapChartTitle = NO; // adjust to preference


#4
rippling
There's also these two properties which you might find useful. See the SChartTitleStyle documentation for more :)
    _chart.theme.chartTitleStyle.position = SChartTitlePositionCenter;
    _chart.theme.chartTitleStyle.overlapChartTitle = NO; // adjust to preference

That does help me. I knew I was missing something right in front of my nose.

Not that it’s important now that I can fix it, but I still don’t understand why the example code defaults to not overlapping and any project I have started defaults to overlapping.