How to create popup and intersecting line passing through center of plot symbol in core plot? - core-plot

How can i create popup and intersecting line passing through center of plot symbol in core plot similar to LineChartView Link:
Screen Shot. Thanks

The Mac CPTTestApp example app includes a "Selection Demo" that draws a cross through the selected point. It is trivial to modify that code to draw only the vertical line. Many of the example apps display a label over the selected point. It's easy to add a border and fill to the text layer that displays the selected value.

Related

How to make a vertical range plot filled with color using CorePlot in iOS?

I need to show a graph in my iOS app something like
We have been using CorePlot for all the graphs and now I need to add a new kind as shown above. I found I could draw a graph like the above with CPTRangePlot. My problem is I can only draw a horizontal graph as shown below.
Is there any way to make it vertical? For a single curve we can easily do that by switching the value on X-axis and Y-axis. But for this kind of "range plot", I could not find a way to make it work for drawing the upper-bound and lower-bound lines and filling range with color can only be achieved on a normal horizontal graph. And yes, I can easily rotate the container view by 90 degrees, as I did in my testbed app. But I just cannot do this in our current app because this new added "range plot" graph is not the only one on the view. We have many other curves sharing the same plot space. So is there any hidden property or method to achieve the job? Thanks in advance!
I just added a fillDirection property to the range plot to enable this feature. You'll need to use the latest code from the release-2.3 branch.

line chart with values and dates graph iOS

I have previously used core plot and jawbone line chart view but now I want grid (background) on graph.
I wanna make exactly like above image any help would be appreciated and also please be specific while posting some third party libs and all.
How can I achieve the above graph (if selected dot/value to show callout) with callout?
Note- In X- axis (dates) and Y- axis (values) are there.
Edit 1:
Is it possible to achieve in core plot? If Yes, How and please be specific.
Thanks in advance.
You can use a plot space annotation to label the callouts. A simple rounded rectangle shape for the labels is easy—set the fill, borderLineStyle, and cornerRadius of the Core Plot text layer used for the annotation. If you need the little arrow on the side of the annotation, you should be able to draw that by using a stretchable image for the fill.

How to achieve customizations in core plot -scatter plot?

I am working on core Plot library in ios.I was able to add mutliple scatter plots to graph.I am not able to achieve following customizations(Pls refer attached image):
Need to connect multiple Y-axis points and draw a vertical line.
On X-axis,need to add number of tasks(Custom UI views) for every month.
Thanks for any help you can give.
Use a third scatter plot to draw the vertical lines.
Don't add subviews to the Core Plot hosting view. Add them to the hosting view's superview. You can use the plot space to find the coordinates along the x-axis to anchor your custom views.

iOS Core Plot X Axis text + icon

Hope you people doing great.I am new to Core Plot api and need your suggestion.I want to customize x index of plot and wants to add icon and label to each index.As I have searched , I got to make policy none to index but I want to add image to each label.Help will be much appreciated.
Custom axis labels don't have to be just text. The label's contentLayer can be any CPTLayer. Depending on what you're trying to achieve, you could render your text and label into an image and use that as the fill for a CPTBorderedLayer, add the icon (in a bordered layer) as a sublayer to the text layer for the label, or even create a custom CPTLayer subclass that draws everything the way you want it.

How to add crosshair vertical line in line graph using Core Plot framework?

I am using core plot framework for drawing the line graph in iPhone and it is working fine.I am displaying system time on X- axis and Temperature on Y- axis.I need to draw the cross hair vertical line that indicate the selected value on the line graph. for example
I would highly appreciate if someone can give me some suggestion to solve this issue.
Thanks in advance.
You can use another axis or scatter plot to draw the line. Using an axis is simpler if all you need is a single horizontal or vertical line. Set all of the tick and grid line styles to nil and use the orthogonalCoordinateDecimal to position it in the correct location. There is a demo using a scatter plot to draw a crosshairs over the selected point in the Mac version of the CPTTestApp example app.

Resources