Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7439147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:39:51+00:00 2026-05-29T10:39:51+00:00

I am using core plot to make a line graph for my iPhone app.

  • 0

I am using core plot to make a line graph for my iPhone app. So far I successfully made the line graph from my xml data.

Furthermore I added a text layer that shows the value (for example 40) once I select the cell
holding the value 40. For this, I use the function:

(CPTLayer *)dataLabelForPlot:(CPTPlot *)plot recordIndex:(NSUInteger)index

So now I want to have a vertical line on the graph to indicate the selected value (the 40). I tried adding CPTBarplot but somehow the bars show only at the beginning of the graph axis.
Is there a function from core plot like the above that will create a line indicator?

I would appreciate if someone can give me some hint how to solve this problem and thank you very much in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:39:52+00:00Added an answer on May 29, 2026 at 10:39 am

    You could use a scatter plot for that. There’s a point selection demo in the Mac CPTTestApp that draws a crosshair over the selected point. It would be trivial to modify that to only draw the vertical line.

    The -numberOfRecordsForPlot: datasource method returns the number of points in the selection indicator (5 for the crosshairs) or zero (0) if there is no current selection. The -numberForPlot:field:recordIndex: method returns the points in the indicator. The points are drawn in this order:

    1. Left
    2. Right
    3. Center (with plot symbol)
    4. Top
    5. Bottom

    The -symbolForScatterPlot:recordIndex: method controls the plot symbol in the center. You can eliminate this method if you don’t need any symbols on the indicator plot.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im using core-plot for my graphing component of my iPhone app, and I have
In iPhone App i am using core Plot vertical bar chart. How to Remove
I started using Core Data for iPhone development. I started out by creating a
I'm using Core Data to locally persist results from a Web Services call. The
I'm using core data in my app. I have two entities that are related:
I'm just starting out with using Core Data on the iPhone SDK and I'm
Using Core Data w/a sqlite store on iPhone.... I've got a bunch of comic
I'm using core data and fetching the results successfully. I've few questions regarding core
I am using core data for my app and I never had any problems
I am using Core Plot for a little App I am programming at the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.