Skip to content

How to change item's ratio after created chartview? #7

@thepolygongo

Description

@thepolygongo
  firstItem = RKPieChartItem(ratio: 50, color: UIColor.orange)
     chartView = RKPieChartView(items: [firstItem])
     chartView.circleColor = .green
     chartView.translatesAutoresizingMaskIntoConstraints = false
     chartView.arcWidth = 10
     chartView.isIntensityActivated = false
     chartView.style = .round
     chartView.isTitleViewHidden = true
     chartView.isAnimationActivated = false
     self.view.addSubview(chartView)

button click function

    @IBAction func clickTest(_ sender: Any) {
        firstItem = RKPieChartItem(ratio: 80, color: UIColor.orange)
    }
    

this doens't work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions