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 6 dataentries into the pie chart but not all of them is shown in the legends. 6th PieChartDataEntry is not shown in the legends.
Here is a snippet of what I coded.
func preparePieChart() { let entry1 = PieChartDataEntry(value: Double(0), label: "Critical Deficiency") let entry2 = PieChartDataEntry(value: Double(1), label: "Open Items") let entry3 = PieChartDataEntry(value: Double(28), label: "Outstanding Open Items") let entry4 = PieChartDataEntry(value: Double(0), label: "Unable to Observe") let entry5 = PieChartDataEntry(value: Double(7), label: "Completed/In Progress") let entry6 = PieChartDataEntry(value: Double(1), label: "Closed Items") let dataSet = PieChartDataSet(values: [entry1, entry2, entry3, entry4, entry5, entry6], label: "") // remove numbers in pie chart dataSet.drawValuesEnabled = false let data = PieChartData(dataSet: dataSet) pieChart.data = data pieChart.chartDescription?.text = "" // Color dataSet.colors = ChartColorTemplates.colorful() //dataSet.valueColors = [UIColor.black] pieChart.holeColor = UIColor.clear pieChart.drawHoleEnabled = false pieChart.chartDescription?.textColor = UIColor.black pieChart.legend.textColor = UIColor.black pieChart.chartDescription?.xOffset = pieChart.frame.width pieChart.chartDescription?.yOffset = pieChart.frame.height * (2/3) pieChart.chartDescription?.textAlign = NSTextAlignment.left pieChart.drawEntryLabelsEnabled = false let legend = pieChart.legend legend.horizontalAlignment = .center legend.verticalAlignment = .bottom legend.orientation = .horizontal legend.drawInside = false legend.enabled = true pieChart.animate(xAxisDuration: 2.0, yAxisDuration: 2.0) // pieChart.xAxis.labelPosition = .top // Refresh chart with new data pieChart.notifyDataSetChanged() }
The text was updated successfully, but these errors were encountered:
would you mind debugging a little?
Sorry, something went wrong.
No branches or pull requests
I have 6 dataentries into the pie chart but not all of them is shown in the legends. 6th PieChartDataEntry is not shown in the legends.
Here is a snippet of what I coded.
The text was updated successfully, but these errors were encountered: