slashlos slashlos - 9 months ago 66
iOS Question

core-plot graph title shadow?

As with adding a shadow to plot's data label, how does one add it to the graph title? This line doesn't work:

CPTMutableShadow * shadow = [CPTMutableShadow shadow];
shadow.shadowColor = [CPTColor blackColor];//colorAtIndex:slot.backRGB];
shadow.shadowOffset = CGSizeMake(1,-1);
shadow.shadowBlurRadius = 2.0f;
graph.titleTextStyle.<?> = shadow;

I guess what's needed along with the examples is a recipe book?


There is no way to set a shadow only on the graph title.

You can use a layer annotation instead of the title. Use a CPTTextLayer as the annotation content layer and set the shadow on that. All CPTLayer objects have a shadow property.