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

Shunshine07 picture Shunshine07  ·  3Comments

deepumukundan picture deepumukundan  ·  3Comments

sjdevlin picture sjdevlin  ·  3Comments

guoyutaog picture guoyutaog  ·  3Comments

newbiebie picture newbiebie  ·  3Comments