Shinobi Charts: Is it possible, to use an pattern image as color for a series?


Hi there,

one Question: I wan’t to achive such a chart design:

  Wished design

I’ve tried already to use an UIColor with pattern image, but this will not work.  :slight_frown:

UIColor *colorForSeries = [UIColorcolorWithPatternImage:[UIImageimageNamed:@"stripeGreyDiagonalLines"]]; = colorForSeries;
 Is it possible in general? If yes, how?


Hi Alex,

I’m afraid this is not possible at the moment. The charts are rendering using OpenGL, so that we can take advantage of the graphics hardware acceleration. This means that we can only support RGB colors. 

However … I do like the look of your example pie chart. I am sure we could find a way to support patterns.

I’ll put it into our bucket of future ideas!

Regards, Colin E.


Is this still not possible? Will alpha of colors at least be honored? The ideal would be pattern but just being able to do non-full alpha colors would be helpful. Also, would this same restriction be the case for annotations? 



Hi Alex,

I’m afraid we haven’t implemented that feature yet. However, it is possible to use donut series with colors containing an alpha of less than 1. If you update the flavourColors property on the donut series style, you can set your colors there.

With regard to annotations, probably the best approach to take will be to subclass SChartAnnotation, and then to add your pattern image as a sub-view of your annotation. They are basically just UIViews, so you have quite a lot of flexibility with what you can do with them.

Hope that helps!



Any news ref patterns support ?

The proposed feature is really nice, especially combined with the ability to style individual bars:



We haven’t started any development on this feature yet as we’ve been focusing on more popular feature requests. I’ll bump this feature in our backlog to highlight its growing popularity!