Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HorizontalBarChartView some X values lost #1634

Closed
hackjie opened this issue Oct 10, 2016 · 8 comments
Closed

HorizontalBarChartView some X values lost #1634

hackjie opened this issue Oct 10, 2016 · 8 comments
Assignees

Comments

@hackjie
Copy link

hackjie commented Oct 10, 2016

  • (id)initForChart:(BarLineChartViewBase *)chart
    {
    self = [super init];
    if (self)
    {
    self->_chart = chart;

    month = @[
               @"一月", @"二月", @"三月", @"四月", @"五月", @"六月", @"七月", @"八月", @"九月", @"十月", @"十一月", @"十二月"
               ];
    

    }
    return self;
    }

  • (NSString *)stringForValue:(double)value
    axis:(ChartAxisBase *)axis
    {
    DDLogInfo(@"haha%f", value);
    return month[MIN(MAX((NSInteger)value, 0), month.count - 1)];
    }

but it shows some of months

@hackjie
Copy link
Author

hackjie commented Oct 10, 2016

@danielgindi
img_1708

you can see the second pic, X lost some value, hope for your help!

@danielgindi
Copy link
Collaborator

I can't read this... @liuxuan30 can you understand what's going on there? To me it looks just like some pretty pictures, and it doesn't read like "months" to me :-D

@danielgindi
Copy link
Collaborator

In Israel we have a saying about something that "it is Chinese to me", like it's something that you don't stand a chance to understand. For you I guess Hebrew would fit better in the saying, or maybe ancient Egyptian...

@kientux
Copy link

kientux commented Oct 10, 2016

I think what he meant is xAxis labels aren't always showing all of them.. I have this problem too, with version 3.0 only. What I expects is all the xAxis labels should be shown, even when the labels count is large (because in Horizontal Bar Chart, there're so much space available to display xAxis labels).

@hackjie
Copy link
Author

hackjie commented Oct 11, 2016

@danielgindi in fact i mean that some of XAxis didn't show up when i use HorizontalBarChartView. it is so strange, @kientux you are right, i use version 3.0 too, guess this is a new bug, haha

@danielgindi
Copy link
Collaborator

Please post a sample so we can test it, the screenshots aren't speaking to me ;-)

@liuxuan30
Copy link
Member

liuxuan30 commented Oct 11, 2016

the text in horizontal bar chart means Jan, Feb, ... Dec in Chinese, in month

The label are Jan, Mar, May, July, Sep, Nov from bottom to top in horizontal bar chart.
He said not every x axis label is appearing, but to me, all the labels are present, no one is missing (except Feb, Apr, Jun... Dec).

I don't think the chart does not show up Feb, Apr.. is a bug, it looks like it just not having those entries, because the x axis label and bars are center aligned perfectly to me.

Need clarification @hackjie

@liuxuan30 liuxuan30 self-assigned this Oct 11, 2016
@liuxuan30
Copy link
Member

I think it's duplicated to #1646 though it's newer than this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants