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

Crash, lineChartView "must implement numberOfPointsInLineChartView" ? #38

Closed
simonbromberg opened this issue Apr 17, 2014 · 12 comments
Closed

Comments

@simonbromberg
Copy link

** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'JBLineChartView // dataSource must implement - (NSInteger)numberOfPointsInLineChartView:(JBLineChartView *)lineChartView'

I'm on the latest version (2.2) and I implemented the methods:

  • (NSUInteger)numberOfLinesInLineChartView:(JBLineChartView *)lineChartView;
  • (NSUInteger)lineChartView:(JBLineChartView *)lineChartView numberOfVerticalValuesAtLineIndex:(NSUInteger)lineIndex;

I tried adding numberOfPointsInLineChartView... but it didn't help and I don't think that method is used anymore...

I must be doing something wrong...

@simonbromberg simonbromberg changed the title Crash, Crash, lineChartView "must implement numberOfPointsInLineChartView" ? Apr 17, 2014
@simonbromberg
Copy link
Author

Think I just forgot to set the delegate / datasource.

@terryworona
Copy link
Collaborator

Cool! Closing.

@simonbromberg
Copy link
Author

Still crashes if I don't have numberOfPointsInLineChartView... was this not switched to verticalValueForHorizontalIndex?

Also wants me to have heightForIndex; wasn't this switched to verticalValueForHorizontalIndex?

Neither of these methods are in the documentation anymore.

@terryworona terryworona reopened this Apr 17, 2014
@terryworona
Copy link
Collaborator

Cool I'll look into it.

@terryworona
Copy link
Collaborator

In order to support multiple lines, numberOfPointsInLineChartView was moved over to numberOfLinesInLineChartView + numberOfVerticalValuesAtLineIndex.

There are no instances of numberOfPointsInLineChartView within the library anymore.

Are you sure you have the latest? Are you using cocoapods? Do a fresh clone of the repository and compare the header and implementations of JBLineChartView.

@terryworona
Copy link
Collaborator

Also, do a free text search for "numberOfPointsInLineChartView"; it should return nothing.

@simonbromberg
Copy link
Author

Yeah, I already checked to make sure I had the latest version, I searched for the old methods and did not find anything, and I made sure I was on the latest version.

Files are identical

@terryworona
Copy link
Collaborator

How it is printing out the assert 'NSInternalInconsistencyException', reason: 'JBLineChartView // dataSource must implement - (NSInteger)numberOfPointsInLineChartView:(JBLineChartView *)lineChartView' when the text "numberOfPointsInLineChartView" doesn't even exist in the project?

Maybe clean and rebuild? I'm stumped.

@simonbromberg
Copy link
Author

Tried a clean, also tried a full delete of the app. No luck. Will try to figure out on my end. Probably my fault somehow.

@terryworona
Copy link
Collaborator

Heh, yeah sorry, I have no clue.

@simonbromberg
Copy link
Author

Right before the assertion failure mentioned above I get:
*** Assertion failure in -[JBLineChartView dataCount], ~/Pods/JBChartView/Classes/JBLineChartView.m:258

@simonbromberg
Copy link
Author

Tried removing and re-adding the pod. No luck.

Tried making a new project and copied the code over, and it works fine in the new project...

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

2 participants