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

Xcode 8.0,many errors...... #1513

Closed
longdw opened this issue Sep 21, 2016 · 27 comments
Closed

Xcode 8.0,many errors...... #1513

longdw opened this issue Sep 21, 2016 · 27 comments

Comments

@longdw
Copy link

longdw commented Sep 21, 2016

When I convert my project to swift3.0,it appears many errors that I can't solve them.Help......

@longdw longdw changed the title XCode 10.0,many errors...... XCode 8.0,many errors...... Sep 21, 2016
@longdw longdw changed the title XCode 8.0,many errors...... Xcode 8.0,many errors...... Sep 21, 2016
@summerness
Copy link

same problem

@nicolla1003
Copy link

When will be official Swift 3.0 support with pods?

@Rushabh5
Copy link

Ya you are right so many error on Classes files. i am not using pod

@Huang-Libo
Copy link

Huang-Libo commented Sep 21, 2016

Advice you don't use pod now, just clone the version you need and drag it to your project.

@Rushabh5
Copy link

ya i am doing this. @Huang-Libo

@Rushabh5
Copy link

G
screen shot 2016-09-21 at 5 52 17 pm
screen shot 2016-09-21 at 5 53 17 pm

etting all error in "CGContextSetLineDash" and solve to any other error. so please help me so we can request to pull with swift-3.

@pmairoldi
Copy link
Collaborator

Use master. It is swift 3.0 already.

@Rushabh5
Copy link

yes i am using master.

@pmairoldi
Copy link
Collaborator

Well if are then you are not using it because the Charts-iOS target doesn't even exist in master it's just Charts.

@Rushabh5
Copy link

What should i do to resolve this issue.? I am trying from last 5 hour. @petester42

@pmairoldi
Copy link
Collaborator

Delete anything charts related in your project and charts itself. Download charts from master again and try to add it again. You can check the charts demo project which integrate charts properly.

@Rushabh5
Copy link

In bridging file getting Module 'Charts' not found

I am importing like @import Charts;

@Rushabh5
Copy link

Solved all error but can you say 1 thing, How to set data in to line chart and bar chart.

before swift-3 we use
LineChartData *data = [[LineChartData alloc] initWithXVals:xVals dataSets:dataSets];

but right now this method doesn't work.

@Huang-Libo
Copy link

Huang-Libo commented Sep 22, 2016

@rs10693 for v3.0:

[[LineChartData alloc] initWithDataSets:dataSets]

Just look at source code in LineChartData, you will find the API you need.

@Rushabh5
Copy link

ya you are right @Huang-Libo but i want to set X value of graph right now set by default value like 0, 2, 4 so on.

@Huang-Libo
Copy link

@rs10693
x value is set in [[ChartDataEntry alloc] initWithX: y:function, and you can use a formatter to format it.

@Rushabh5
Copy link

Ok i'll try thank you very much for your support. and one more question any update for BalloonMarker class. @Huang-Libo

@Huang-Libo
Copy link

Huang-Libo commented Sep 24, 2016

@rs10693 You can get more info about how to Migrating to Charts 3.0 in this issue #1474

@Rushabh5
Copy link

Sure. @Huang-Libo

@Rushabh5
Copy link

Hi,

I am trying to set date in [[ChartDataEntry alloc] initWithX: y: but in lib you are passing double value so only display single digit and i want to display like 09-25, 09-24 so on. plz help me. @Huang-Libo

@Huang-Libo
Copy link

@rs10693 You can find a example about how to format xAxis's value in Time Line Chart Demo.

@Rushabh5
Copy link

Rushabh5 commented Sep 26, 2016

Hello @Huang-Libo

I am create an array and in that m stored all date which i received from back-end so can you elaborate to how to convert string to double because of that class is instancetype_nonnull.

@Rushabh5
Copy link

Hello @Huang-Libo

I am trying like this,

xVals = ["26-09","25-09","24-09"];
for (int i = 0; i < yAxisArray.count; i++)//individual bar value
{
double yVal = [[yAxisArray objectAtIndex:i] doubleValue];
double xVal = [[xVals objectAtIndex:i] doubleValue];
[yVals1 addObject:[[BarChartDataEntry alloc] initWithX:xVal y:yVal]];

}

so i want to display String in xAxis and now i am using granularity so xAxis are not display. pls help me it's very urgent.

@liuxuan30
Copy link
Member

@rs10693 could you exlain under what situation xAxis not display? Have you zoomed in?

@Huang-Libo
Copy link

@rs10693
Use NSTimeInterval to store your xAxis' value,

@property(readonly) NSTimeInterval timeIntervalSince1970;

It's the interval between the date object and 00:00:00 UTC on 1 January 1970.

@Rushabh5
Copy link

Hello @Huang-Libo

Thank you very much. now it's perfect.

@Rushabh5
Copy link

Hello @liuxuan30
Refer #1496 and then you facing any problem then told me.

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

7 participants