We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
i have set the noDataText still its showing the empty white circle and not label here is my code
override func viewDidLoad() { super.viewDidLoad() self.navigationItem.title = LocalizedString("Charts.Title") piechartView.backgroundColor = self.view.backgroundColor piechartView.holeColor = self.view.backgroundColor; piechartView.delegate = self piechartView.usePercentValuesEnabled = true; piechartView.holeRadiusPercent = 0.58; piechartView.transparentCircleRadiusPercent = 0.61; piechartView.descriptionText = ""; piechartView.drawCenterTextEnabled = true; piechartView.drawHoleEnabled = true; piechartView.rotationAngle = 0.0; piechartView.rotationEnabled = true; piechartView.centerText = "Housekeeping"; piechartView.noDataText = "No Schedule Data"
} override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(true) self.setChartValues() } func setXValues(_ xValues: NSArray, yValues: NSArray) { var yVals1 : [ChartDataEntry]? = [ChartDataEntry](); for i in 0 ..< yValues.count { yVals1?.append(ChartDataEntry(value: (yValues.object(at: i) as AnyObject).doubleValue, xIndex: i) as ChartDataEntry) } let dataSet = PieChartDataSet(yVals: yVals1, label: "") if xValues.count > 1 { dataSet.sliceSpace = 3.0 } dataSet.colors = colors let data = PieChartData(xVals: xValues as? [String] , dataSet:dataSet) let pFormatter = NumberFormatter(); pFormatter.numberStyle = NumberFormatter.Style.percent; pFormatter.maximumFractionDigits = 1; pFormatter.roundingMode = .down pFormatter.multiplier = 1.0; pFormatter.percentSymbol = " %"; data.setValueFormatter(pFormatter); data.setValueTextColor(UIColor.white) piechartView.data = data piechartView.highlightValues(nil) piechartView.setNeedsDisplay() }
The text was updated successfully, but these errors were encountered:
you should not set chart data if you don't have data at all.
Sorry, something went wrong.
No branches or pull requests
i have set the noDataText still its showing the empty white circle and not label
here is my code
override func viewDidLoad() {
super.viewDidLoad()
self.navigationItem.title = LocalizedString("Charts.Title")
piechartView.backgroundColor = self.view.backgroundColor
piechartView.holeColor = self.view.backgroundColor;
piechartView.delegate = self
piechartView.usePercentValuesEnabled = true;
piechartView.holeRadiusPercent = 0.58;
piechartView.transparentCircleRadiusPercent = 0.61;
piechartView.descriptionText = "";
piechartView.drawCenterTextEnabled = true;
piechartView.drawHoleEnabled = true;
piechartView.rotationAngle = 0.0;
piechartView.rotationEnabled = true;
piechartView.centerText = "Housekeeping";
piechartView.noDataText = "No Schedule Data"
The text was updated successfully, but these errors were encountered: