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

xAxis.avoidFirstLastClippingEnabled=YES problem.Version 2.1.4a #479

Closed
AntiMoron opened this issue Oct 15, 2015 · 9 comments
Closed

xAxis.avoidFirstLastClippingEnabled=YES problem.Version 2.1.4a #479

AntiMoron opened this issue Oct 15, 2015 · 9 comments

Comments

@AntiMoron
Copy link
Contributor

See left bottom corner.
The caption of the first group goes too inside.
e4f4b8c9772b1977ac81a4e84e233f97

Replace blow codes in the Demo project to reappear the problem.

//Classes/Demos/MultipleBarChartViewController.m 
@implementation MultipleBarChartViewController

- (void)viewDidLoad
{
    [super viewDidLoad];

    self.title = @"Multiple Bar Chart";

    self.options = @[
                     @{@"key": @"toggleValues", @"label": @"Toggle Values"},
                     @{@"key": @"toggleHighlight", @"label": @"Toggle Highlight"},
                     @{@"key": @"toggleHighlightArrow", @"label": @"Toggle Highlight Arrow"},
                     @{@"key": @"animateX", @"label": @"Animate X"},
                     @{@"key": @"animateY", @"label": @"Animate Y"},
                     @{@"key": @"animateXY", @"label": @"Animate XY"},
                     @{@"key": @"toggleStartZero", @"label": @"Toggle StartZero"},
                     @{@"key": @"saveToGallery", @"label": @"Save to Camera Roll"},
                     @{@"key": @"togglePinchZoom", @"label": @"Toggle PinchZoom"},
                     @{@"key": @"toggleAutoScaleMinMax", @"label": @"Toggle auto scale min/max"},
                     ];

    _chartView.delegate = self;

    _chartView.descriptionText = @"";
    _chartView.noDataTextDescription = @"You need to provide data for the chart.";

    _chartView.pinchZoomEnabled = NO;
    _chartView.drawBarShadowEnabled = NO;
    _chartView.drawGridBackgroundEnabled = NO;

    BalloonMarker *marker = [[BalloonMarker alloc] initWithColor:[UIColor colorWithWhite:180/255. alpha:1.0] font:[UIFont systemFontOfSize:12.0] insets: UIEdgeInsetsMake(8.0, 8.0, 20.0, 8.0)];
    marker.minimumSize = CGSizeMake(80.f, 40.f);
    _chartView.marker = marker;

    ChartLegend *legend = _chartView.legend;
    legend.position = ChartLegendPositionRightOfChartInside;
    legend.font = [UIFont fontWithName:@"HelveticaNeue-Light" size:11.f];

    ChartXAxis *xAxis = _chartView.xAxis;
    xAxis.labelFont = [UIFont fontWithName:@"HelveticaNeue-Light" size:10.f];

    ChartYAxis *leftAxis = _chartView.leftAxis;
    leftAxis.labelFont = [UIFont fontWithName:@"HelveticaNeue-Light" size:10.f];
    leftAxis.valueFormatter = [[NSNumberFormatter alloc] init];
    leftAxis.valueFormatter.maximumFractionDigits = 1;
    leftAxis.drawGridLinesEnabled = NO;
    leftAxis.spaceTop = 0.25;

    _chartView.rightAxis.enabled = NO;
    _chartView.valueFormatter = [[NSNumberFormatter alloc] init];
    _chartView.valueFormatter.maximumFractionDigits = 1;
    _chartView.xAxis.avoidFirstLastClippingEnabled = YES;
    _chartView.xAxis.labelPosition = ChartLimitLabelPositionLeftBottom;


    _sliderX.value = 9.0;
    _sliderY.value = 100.0;
    [self slidersValueChanged:nil];
}
@AntiMoron
Copy link
Contributor Author

@danielgindi I don't know if this is a bug? Can you check it?

@AlBirdie
Copy link
Contributor

I don't get it. What exactly do we see in the bottom left corner?

@AntiMoron
Copy link
Contributor Author

The label for the first group should be aligned to left border instead standing between the first group and the second group..

Compare with what LineChartView displays if you still don't get it.@AlBirdie
qq 20151015232959

@AntiMoron
Copy link
Contributor Author

Nobody handles this?

@danielgindi
Copy link
Collaborator

I'll look at it soon, haven't had the time yet
Have you checked if this is reproducible in the Android repo also?
@PhilJay any idea?

@PhilJay
Copy link
Collaborator

PhilJay commented Oct 20, 2015

I'll have a look at it :-)

@PhilJay
Copy link
Collaborator

PhilJay commented Oct 20, 2015

Yep, issue is the same for Android - it's related to barcharts I think. Because the bars occupy different space than e.g. line entries.

@AntiMoron
Copy link
Contributor Author

Maybe I can help fix this.

@AntiMoron
Copy link
Contributor Author

@danielgindi
already create pull request for bugfixing.
check this : #489

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

No branches or pull requests

4 participants