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 8493883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:08:35+00:00 2026-06-10T23:08:35+00:00

I have implemented the following code in my CPTScatterPlotDelegate to display a callout bubble:

  • 0

I have implemented the following code in my CPTScatterPlotDelegate to display a callout bubble:

-(void)scatterPlot:(CPTScatterPlot *)plot plotSymbolWasSelectedAtRecordIndex:(NSUInteger)index
{
    CPTXYPlotSpace *plotSpace = (CPTXYPlotSpace *)plot.plotSpace;
    CPTGraph *graph = plot.graph;
    int yIdent = ((NSString*)plot.identifier).intValue;

    NSNumber *yVal = [[_dataRange yForIndex:index] objectAtIndex:yIdent-1];
    NSNumber *xVal = [_dataRange xForIndex:index];
    double doublePrecisionPlotPoint[2];//[x,y]
    doublePrecisionPlotPoint[0] = xVal.doubleValue;
    doublePrecisionPlotPoint[1] = yVal.doubleValue;
    CGPoint touchedPoint = [graph.defaultPlotSpace plotAreaViewPointForDoublePrecisionPlotPoint:doublePrecisionPlotPoint];

    if(_annotation)
        [_annotation dismissCalloutAnimated:YES];
    _annotation = [[SMCalloutView alloc] init];
    //todo appropriate units
    _annotation.title = [NSString stringWithFormat:@"%.2f kg", yVal.doubleValue];
    [_annotation presentCalloutFromRect:CGRectMake(touchedPoint.x, touchedPoint.y, 1, 1) inView:_view constrainedToView:_view permittedArrowDirections:SMCalloutArrowDirectionAny animated:YES];
}

_dataRange is just a custom class holding my data and _annotation is the instance of my callout.

The problem is I cant’t get the position of the callout working properly. If I set _view to the ViewController.view I get the right callout but in the wrong place like this:

Clicked point in yellow

If I set _view to the CPTGraphHostingView instead I get the right point but the callout appears to be flipped like this:

enter image description here

How to I get the right plot point co-ordinates to display the callout?

  • 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-06-10T23:08:37+00:00Added an answer on June 10, 2026 at 11:08 pm

    You shouldn’t add any subviews to the hosting view—it uses a flip transform on iOS so Core Plot can share drawing code between iOS and the Mac.

    Use the -convertPoint:toView: or -convertPoint:fromView: method to convert touchedPoint from the hosting view’s coordinate system to the ViewController.view coordinate system.

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

Sidebar

Related Questions

I've have already implemented pagination using the following code: public Paginacao<Anuncio> consultarPaginado(int pagina, Integer
I have implemented contextual menus in QTreeView items with the following code MyDerivedQTreeView->setModel(MyDerivedQAbstractItemModel); MyDerivedQTreeView->setContextMenuPolicy(Qt::CustomContextMenu);
I have implemented following code in my application. -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
I have implemented the following code from this page: http://tympanus.net/codrops/2010/06/02/smooth-vertical-or-horizontal-page-scrolling-with-jquery/ $(document).ready(function() { $('ul.navone li
In order to understand the Monitor I have implemented the following code.But I am
I have implemented the following code but my SearchActivity::OnCreate is not getting called. Can
I have implemented an error style for textboxes using the following code. This sets
I have the following code, I have implemented something like this so far, but
I have implemented the IEquatable interface in a class with the following code. public
I have implemented following code: $('#select1').change(function() { var options = ''; if($(this).val() == 'a')

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.