Charts: Type 'NSAttributedStringKey' (aka 'NSString') has no member 'font'

Created on 3 Oct 2017  路  8Comments  路  Source: danielgindi/Charts

Charts/Source/Charts/Renderers/BarChartRenderer.swift:620:121: Type 'NSAttributedStringKey' (aka 'NSString') has no member 'font'

Most helpful comment

Change Swift Language Version to Swift 4.0

All 8 comments

Having the same issue, just updated to Xcode 9, running Charts version 3.0.4.

Ok, so the issue happens because NSAttributedStringKey was introduced in Swift 4 for a more convenient handling of the attribute keys.

I was using Swift 3.2, but after updating my application, all the problems went away.

Change Swift Language Version to Swift 4.0

Is there any alternative to not update to swift 4.0?

Had the same issue. Fixed by using an older version of Charts.

any one who uses 3.0.4 must use Swift 4. If there are any frameworks requires lower, you should roll back chart or upgrade those old frameworks.

attributes: [NSFontAttributeName: label.font] with swift 3.2 .

My project use swift 3.2 now. ..

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ahmedsafadii picture ahmedsafadii  路  3Comments

guanyanlin picture guanyanlin  路  3Comments

deepumukundan picture deepumukundan  路  3Comments

kirti0525 picture kirti0525  路  3Comments

cilasgimenez picture cilasgimenez  路  4Comments