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

Issue #280 #335

Closed
wants to merge 8 commits into from
Closed

Issue #280 #335

wants to merge 8 commits into from

Conversation

noais
Copy link
Contributor

@noais noais commented Aug 31, 2015

To enable this feature needs to set lineBreakerEnabled on lineDataSet.

With this we can have break lines, the only thing we need to do is to jump a index.

For ex:
[yVals addObject:[[ChartDataEntry alloc] initWithValue:5 xIndex:1]];
[yVals addObject:[[ChartDataEntry alloc] initWithValue:5 xIndex:2]];
[yVals addObject:[[ChartDataEntry alloc] initWithValue:5 xIndex:4]];
[yVals addObject:[[ChartDataEntry alloc] initWithValue:5 xIndex:5]];

I change the first line char example have some example. (This alteration need to be deleted).

I made this pull request to have yours opinion, if you like like it was I go to clean the code.

david and others added 7 commits August 27, 2015 16:53
size need to be calculated see fixme
Remove chart line

size need to be calculated see fixme

add breackLine chart need to set enable/disable

flag

no message
…swift-2.0

# By david ferreira (4) and david (1)
* 'swift-2.0' of https://github.com/noais/ios-charts:
  no message
  flag
  add breackLine chart need to set enable/disable
  Remove chart line
  flag to enable break line
@liuxuan30
Copy link
Member

Thanks for your effort!

Some things needed to be improve:

  1. the code style, especially the {} around if else
  2. I just see you changed drawLinear, but drawCubic is not touched
  3. drawLinearFill and drawCubicFill is not touched yet.

As a feature, I think it would be great to have them all in place (see the tough part? :-) )

@noais
Copy link
Contributor Author

noais commented Sep 1, 2015

Ok, I'm going to finish all around linear (drawLinearFill and better format).
Do you know some tool to format automatically swift code?

This week end I start to implement to drawCubic.

I have done this pull request more to see if you all agree with my approach to implement this new feature.
I'm going to reject my pull request and when I'm really finish I create a new pull request.

@liuxuan30
Copy link
Member

I don't know the tool, I format manually since ios-charts has its own format.
PS, the filling feature is tricky, remember to test 'pure negative values' and 'positive+negative values' (with/without startAtZeroEnabled), these are the monsters when I tried to implement but got a lot of visual effect bugs.

@noais
Copy link
Contributor Author

noais commented Sep 2, 2015

@osolano
Copy link

osolano commented Feb 17, 2016

@liuxuan30 @noais I was able to make line gaps by setting the color array of the linedatachart set to the same color as the background for a missing data point.

For example, if there are 4 data points missing, and the 3rd one is 0 and we want to show a gap here, i would set the 3rd color in the color array to match the background of the grid. This make it look like there was a line break.

image

@noais
Copy link
Contributor Author

noais commented Feb 17, 2016

@osolano this is a work around. For instance this solution doesn't work for me, because I have a gradient colour on background...

@osolano
Copy link

osolano commented Feb 17, 2016

@noais yes purely workaround, just wanted to point it out in case you didn't have a solution before. Cheers!

@liuxuan30
Copy link
Member

@osolano I have implemented the line break feature already, without filling feature support. I would start working on line breaking feature 'again' maybe next month and try to fix the buggy filling portion while line is broke. Once it's done, I will try file a PR for this. But still, huge work to do, so no ETA

@noais
Copy link
Contributor Author

noais commented Feb 18, 2016

@liuxuan30 I start already this implementation but I never had time to finishing. I don't know if you want to start from 0 or you want to see what I have made?

@liuxuan30
Copy link
Member

I had my own too :) it's just about fix those annoying bugs for filling feature

@JCMcLovin
Copy link
Contributor

Did this ever get merged and is the feature supported in version 4.0?

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

Successfully merging this pull request may close these issues.

4 participants