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

Error: "Assignment to readonly property" when updating charts data #1024

Closed
fazal07 opened this issue May 12, 2016 · 3 comments
Closed

Error: "Assignment to readonly property" when updating charts data #1024

fazal07 opened this issue May 12, 2016 · 3 comments

Comments

@fazal07
Copy link

fazal07 commented May 12, 2016

set1 = (LineChartDataSet *)_chartView.data.dataSets[0];
set1.yVals = yVals; ("Assignment to readonly property")
_chartView.data.xValsObjc = xVals; ("Assignment to readonly property")
[_chartView notifyDataSetChanged];

I am using charts library in objective-c project via cocoa-pod

@liuxuan30
Copy link
Member

    /// the array of y-values that this DataSet represents.
    public var yVals: [ChartDataEntry]
    {
        get
        {
            return _yVals
        }
        set
        {
            _yVals = newValue
            notifyDataSetChanged()
        }
    }

maybe clean and rebuild.

@fazal07
Copy link
Author

fazal07 commented May 12, 2016

@Property (nonatomic, readonly, copy) NSArray<ChartDataEntry *> * _Nonnull yVals;
in charts-Swift.h

@danielgindi
Copy link
Collaborator

You are not using master, but the latest release. We will make a release soon.
Wrapping up some stuff...

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

3 participants