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

labels not working on v2? #246

Open
nimrodbens opened this issue Jul 23, 2022 · 2 comments
Open

labels not working on v2? #246

nimrodbens opened this issue Jul 23, 2022 · 2 comments

Comments

@nimrodbens
Copy link

tried this code:

import SwiftUI
import SwiftUICharts

struct TestView: View {
    var body: some View {
        PieChart()
            .data([("Rent", 1300), ("Transport", 500)])
            .chartStyle(.init(backgroundColor: .greenRed, foregroundColor: [.redBlack, .orangeBright]))
    }
}

struct TestView_Previews: PreviewProvider {
    static var previews: some View {
        TestView()
    }
}

and no labels are shown. both in landscape and portrait mode.

results can be seen here: https://imgur.com/a/n1EDas0

@nimrodbens nimrodbens changed the title labels not working on v2? labels not working on v2? [v2] Jul 23, 2022
@nimrodbens nimrodbens changed the title labels not working on v2? [v2] [v2] labels not working on v2? Jul 23, 2022
@nimrodbens nimrodbens changed the title [v2] labels not working on v2? labels not working on v2? Jul 23, 2022
@app4g
Copy link

app4g commented Jul 26, 2022

Looking thru the code for V2, it really doesn't seems like it's implemented.
you can see that the code will separate out the DataPoints and the Label Strings, but it only uses the DataPoints and the Label Strings are not used at all. (at least I can't locate where they are within the BarChart codes)

@app4g
Copy link

app4g commented Jul 27, 2022

Check this --> #243 (comment)

Managed to get it done

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