Core-Plot highlighting a single candlestick bar - iphone

I have a CPTTradingRangePlot with a CPTTradingRangePlotStyleCandleStick style.
I'm looking for a way to highlight a specific (or a few) candlesticks with a different fill color (or a glow, or something), but I can't find a way to access individual candlesticks in a similar way that a CPTBarPlot has with -(CPTFill *)barFillForBarPlot:(CPTBarPlot *)barPlot recordIndex:(NSUInteger)index;
Am I missing something here?
Can I somehow maybe access a specific candlestick after the data load, and then change the fill color?
I was also thinking about adding an Annotation Layer, and maybe draw a circle around the specific candlestick(s), but I don't want to use an image, since it will get stretched and pixelated when I'll adjust it's size.
Is there any way to draw a vector-based shape as an annotation around the candlesticks?
Thanks for any help!

You can put a request for that feature on the Core Plot issue tracker. In the meantime, you can achieve the same look by using more than one plot, one for each different style.

Related

Custom circle shape reactive model

Trying to reach design from screenshot.
All elements in circle must be able to work with logic which include change color.
Gray and green'ish one elements are disabled and blue'ish is active.
Probably I should use some kind of canvas to get this done, but I am not sure.
Thanks for all response!
Edit:
Very important part of logic. I want to dynamicaly change number of those circular elements.
You would need to use custom painter to achieve this.
You can check out Flutter shape maker! its a tool that can help with drawing this out.

Graph combining HorizontalBarChart & CubicLineChart?

Is it possible to draw a graph combining a HorizontalBarChart with a CubicLineChart with iOS-charts? The CubicLineChart would be drawn from top to bottom, following the horizontal bars rather than left to right.
If not, can anyone recommend a graph library that would support this please?
Currently, No. But technically, you could, but you need to do a lot of decent study on the framework and rewrite a bunch of methods to get it work.
Check out how combined chart is carried out, and make sure you understand how the ChartTransformer get setup and work. Then you are good to go.
The other way is, use vertical bar chart and normal line chart to get what you want, like a combined chart, and rotate it 90 degree, and customize the axis labels maybe easier for you?
BTW, you need to know that chart is making data easy to understand, I'm not sure would a chart like you said make it easier?

How to draw custom line on MKMapview?

I've been searching for a way to draw a custom line, but the only help I can find is how to draw lines with an UIColor.
I want to draw a straight line but not just with a color. I want the appearance of the line to be customizable.
(So right now I can draw lines between 2 points, but not the line I want)
The line I want got straight 45 degree lines on it, and it's grey and black.
Anybody can help?
The line looks like this, I'm also thinking that I could stretch this image, but if I stretch it, it will look kinda weird.
Why don't you add image then? I'm new developer so I don't know other way to do it. Only OpenGL with texturing, but there is no need to use openGL. So my suggestion is to add image.
Sound like what your looking for is the MKPolylineView Class. You assign it a polyline which contains the points in your line. Since the polyline view is an MKOverlayPathView you can set the stroke and fill colors.
Since it's also a UIView subclass you can manipulate the appearance even further by grabing the views layer property and adding gradients, shadows, masks, etc.
Is there a specific effect that you're trying to achieve?

Draw color on country (Mapkit) when it is selected

I want to color the country on selection of the country from a tableView. Can you help me please?
Considering your case, let me give you a heads up that this would require edge detection (so if you haven't done that before, it will take a LONG time), though not lots of it and the following is just one way of approaching this problem:
1) Take out an image context from the map you have.
2) Apply relevant edge detection algorithms in the area you want and use a bright color to differentiate. Note that this way, the inside would not be colored and I can't tell you for sure if that's possible or not.
3) Add that context as a subView on top of the map.
Also take a look at the Quartz 2D programming guide for more tips.
I would suggest something different, though. Keep pre-stored images for all the possibilities and just put a UIImageView with that as its image in front of the map - this will save you a lot of headache.

iphone app developement: How to manipulate a selected area of an image?

The function I need to implement is like this:
1> select an small area of an image. This small area could be various shape, not only rectangle.
2> manipulate this area. for example: blurring
Is there any way to do it?
Thanks.
You've got your work cut out for you. Here is one way to do it. Make the selection. Whether you do it with CG paths, or some other way, you want to take the selected image, and make all the unselected area have an alpha of zero. YOu can accomplish this with blendmodes.
Then get the pixel data. See: http://developer.apple.com/mac/library/qa/qa2007/qa1509.html
Then you go through the data and anywhere where your alpha isn't zero, you average the pixel with the pixel one before it, one after it, one above it, and one below it. Of course there are many different ways to blur and this is a poor man's routine.