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

Following old real time example problems #4561

Closed
poml88 opened this issue Jan 25, 2021 · 3 comments
Closed

Following old real time example problems #4561

poml88 opened this issue Jan 25, 2021 · 3 comments

Comments

@poml88
Copy link

poml88 commented Jan 25, 2021

Hi,

I am trying to follow this example
#2859 (comment)
using xcode 12 and Charts 3.6.0

I get two issues:
set1 = LineChartDataSet(values: yEntries, label: "DataSet 1") is giving me
Incorrect argument label in call (have 'values:label:', expected 'entries:label:')
So I guess it should be
set1 = LineChartDataSet(entries: yEntries, label: "DataSet 1") now.
So far so good.

But then at
`var set1 = LineChartDataSet()
set1 = (chartView.data?.dataSets[0] as? LineChartDataSet)!

    set1.entries = yEntries

    chartView.data?.notifyDataChanged()
    chartView.notifyDataSetChanged()`

I get for
set1.values = yEntries
Cannot assign to property: 'values' is a get-only property

and I am not able to figure out how to fix this. Any ideas?
Maybe also other people trying that example will run into this issue.
Thanks

@thierryH91200
Copy link
Contributor

@poml88
Copy link
Author

poml88 commented Jan 25, 2021

That was a quick reply, just one minute. Thank you!
I'll check it out.
Maybe you can add a link to your demo in the other issue?

@poml88
Copy link
Author

poml88 commented Jan 25, 2021

Ahhh, it has to be
set1.replaceEntries(yEntries)
now I get it.

@poml88 poml88 closed this as completed Jan 25, 2021
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