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

  • Home
  • SEARCH
  • 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 7865035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:57:51+00:00 2026-06-02T23:57:51+00:00

I am using core-plot for drawing bar graphs. I have displayed date on x-axis.

  • 0

I am using core-plot for drawing bar graphs. I have displayed date on x-axis. I have used following code:

NSDateFormatter * formatter=[[NSDateFormatter alloc]init];
[formatter setDateFormat:@"dd MMM yy"];

double tickLocation=0.5;
NSMutableArray *customLabels = [NSMutableArray arrayWithCapacity:[valuesArray count]];
for ( HistoryIndividualValueBean * value in valuesArray)
{
    CPTAxisLabel *newLabel = [[CPTAxisLabel alloc] initWithText:[formatter stringFromDate:value.submittedTime] textStyle:x.labelTextStyle];
    newLabel.tickLocation = [[NSNumber numberWithDouble:tickLocation++] decimalValue];
    newLabel.offset       = x.labelOffset + x.majorTickLength;
    newLabel.rotation     = M_PI_2;
    [customLabels addObject:newLabel];
    [newLabel release];
}

[formatter release];

x.axisLabels = [NSSet setWithArray:customLabels];

This is working fine on iphone. But on ipad it displays weird characters in date(which I have formatted above). Please refer to this image:

enter image description here

  • 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-02T23:57:52+00:00Added an answer on June 2, 2026 at 11:57 pm

    The reason you see this behavior is that MMM format is locale-specific. In Japan, it formats the month as month’s number followed by the 月 character.

    If you would like a three-letter name of the months to be displayed regardless of the locale, pick US as the locale for your formatter:

    NSLocale *usLocale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
    [formatter setLocale:usLocale];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am plotting a graph using Core-Plot. When i use following code for x-axis
i am using core plot framework,when i run following code in viewdidload gives crash.the
I am using the Core Plot library for drawing graphs on the iOS. I
I have slider in one view and Bar chart using core plot in its
I have a pie chart that I build using Core Plot. Also I used
I have created a graph using core plot. Graph is shown in on the
I am drawing a ScatterPlot using core-plot framework. My x coordinates are hours starting
Im using core-plot for my graphing component of my iPhone app, and I have
I am using core-plot library to draw a bar-chart on my iPhone application and
I am using Core-plot to plot vertical bar chart. In that is it possible

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.