pie-chart

How to show Percentage sign in pie chart using daniel gindi/Chart library in swift(IOS Chart)

我只是一个虾纸丫 提交于 2019-12-03 00:50:08
I am using the Charts framework (by Daniel gindi). It was working fine but how to show % (sign) on piechart? I am also try use NSNumberFormatter() method for covert data value in percantage but not get % sign. I am upload code here @IBOutlet var pieChart: PieChartView! override func viewDidLoad() { super.viewDidLoad() var data = [25.0,37.5,12.5,12.5,12.5] // pie chart data var status = ["A","B","C","D","E"] // status setChart(status, values: data) self.pieChart.drawSliceTextEnabled = false } func setChart(dataPoints: [String], values: [Double]) { pieChart.noDataText = "you need to provide data

Pie chart using Charts library with swift

蓝咒 提交于 2019-12-02 20:47:11
I am integrating pie chart in my app using Charts library and getting issue with chart data my code is import UIKit import Charts class ViewController: UIViewController { @IBOutlet weak var pieChartView: PieChartView! override func viewDidLoad() { super.viewDidLoad() let months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun"] let unitsSold = [10.0, 4.0, 6.0, 3.0, 12.0, 16.0] setChart(dataPoints: months, values: unitsSold) } func setChart(dataPoints: [String], values: [Double]) { var dataEntries: [ChartDataEntry] = [] for i in 0..<dataPoints.count { let dataEntry1 = ChartDataEntry(x: Double(i), y:

using VBA for a pie bubble chart in excel

ぃ、小莉子 提交于 2019-12-02 17:02:14
问题 My code is Sub PieMarkers() Dim chtMarker As Chart Dim chtMain As Chart Dim intPoint As Integer Dim rngRow As Range Dim lngPointIndex As Long Dim thmColor As Long Dim myTheme As String Application.ScreenUpdating = False Set chtMarker = ActiveSheet.ChartObjects("chtMarker").Chart Set chtMain = ActiveSheet.ChartObjects("chtMain").Chart Set chtMain = ActiveSheet.ChartObjects("chtMain").Chart Set rngRow = Range(ThisWorkbook.Names("PieChartValues").RefersTo) For Each rngRow In Range(

JavaFX PieChart Tooltip not showing despite being installed

纵饮孤独 提交于 2019-12-02 13:43:19
问题 I tried displaying a tooltip for each "slice" of a PieChart similar to this in chart.js: I found this answer basically trying to achieve the same in the same framework. It has two upvotes and the same seemed to work on other chart types judging by other (accepted) answers. However the code would not really work for me in the sense that there was no tooltip showing up. Example code showing the problem: import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.chart

using VBA for a pie bubble chart in excel

六月ゝ 毕业季﹏ 提交于 2019-12-02 11:50:15
My code is Sub PieMarkers() Dim chtMarker As Chart Dim chtMain As Chart Dim intPoint As Integer Dim rngRow As Range Dim lngPointIndex As Long Dim thmColor As Long Dim myTheme As String Application.ScreenUpdating = False Set chtMarker = ActiveSheet.ChartObjects("chtMarker").Chart Set chtMain = ActiveSheet.ChartObjects("chtMain").Chart Set chtMain = ActiveSheet.ChartObjects("chtMain").Chart Set rngRow = Range(ThisWorkbook.Names("PieChartValues").RefersTo) For Each rngRow In Range("PieChartValues").Rows chtMarker.SeriesCollection(1).Values = rngRow ThisWorkbook.Theme.ThemeColorScheme.Load

Pie Chart transparency, multiple Pies

陌路散爱 提交于 2019-12-02 11:34:40
问题 I would like to stack two pie charts ontop each other. The idea here is then to make one of them smaller so you only can see a outer ring of the pie chart behind. I tried using: chartCalProgres.BackColor = Color.Transparent; chartCalProgres.ChartAreas[0].BackColor = Color.Transparent; But as you can see in the link below, it did not work. Anyone have an idea to how this effect could be achieved? Pie Charts Should look like this 回答1: This is not possible with Pie charts, but you can get it

How to remove extra spacing from piechart?

♀尐吖头ヾ 提交于 2019-12-02 10:03:15
I am working on pie-chart. problem is it keep spacing around piechart . how can i remove extra spacing from piechart. Your answer would be appreciated try calling setOffsets(float left, float top, float right, float bottom) on the Chart EX chart.setViewPortOffsets(0f, 0f, 0f, 0f); check Modifying the Viewport I had the same problem and solved it by adding below line to dataset: dataSet.setSelectionShift(0f); 来源: https://stackoverflow.com/questions/37159890/how-to-remove-extra-spacing-from-piechart

How can I cause a legend to appear to the right of the pie (Chart.JS)?

早过忘川 提交于 2019-12-02 10:02:09
I'm creating a fairly simple pie chart with Chart.JS like so: var data = { labels: [ "Bananas (18%)", "Lettuce, Romaine (14%)", "Melons, Watermelon (10%)", "Pineapple (10%)", "Berries (10%)", "Lettuce, Spring Mix (9%)", "Broccoli (8%)", "Melons, Honeydew (7%)", "Grapes (7%)", "Melons, Cantaloupe (7%)" ], datasets: [ { data: [2755, 2256, 1637, 1608, 1603, 1433, 1207, 1076, 1056, 1048], backgroundColor: [ "#FFE135", "#3B5323", "#fc6c85", "#ffec89", "#021c3d", "#3B5323", "#046b00", "#cef45a", "#421C52", "#FEA620" ] } ] }; var optionsPie = { responsive: true, scaleBeginAtZero: true, tooltips: {

Aligning text in pieChart legend - How to right align the content inside the legend

☆樱花仙子☆ 提交于 2019-12-02 07:35:03
问题 As of now my legend is displayed like this test1 5% test2test2 10% test2test2test3 85% I am trying to display like this, with spaces and right aligned. test1-------------------------5% test2test2test2-----------10% test3test3test3-----------85% Any suggesstions appreciated 回答1: You can use the approach shown here to create a separate panel containing your legend items. Give the panel a GridLayout(0, 1) ; specify JLabel.LEFT for the left column and JLabel.RIGHT for the right column. A complete

Is it possible to create a pie in pie chart in SPSS or R?

别说谁变了你拦得住时间么 提交于 2019-12-02 05:36:21
问题 This question was migrated from Cross Validated because it can be answered on Stack Overflow. Migrated 5 years ago . I know it is possible to create such double pie charts in excel like this: http://chandoo.org/wp/2009/12/02/group-small-slices-in-pie-charts/ but can SPSS or R do this also? 回答1: In relation to R: The answer to the title question is "yes" ... see ?pie As for the second question, the one in the body - it would be possible but would involve some coding. You'd have to draw two pie