pie-chart

Raphael JS Pie: Add ID to path slices

≯℡__Kan透↙ 提交于 2019-12-21 20:24:40
问题 I've seen this question asked over at the Raphael Google Groups, but after hours of searching there, and also on here, and Google, I cannot seem to find a solution. I would simply like to be able to target my pie chart (svg path) slices using jQuery, but I cannot figure out how to add custom id's to the path tags - there is no ID attribute in there by default: <path fill="#764c29" stroke="none" d="M350,350L350.6911881148345,94.00093308961084A256,256,0,0,1,561.8463375189659,206.2741175716762Z"

Plotting pie charts in ggplot2

强颜欢笑 提交于 2019-12-21 06:58:01
问题 I want to plot a proper pie chart. However, most of the previous questions on this site were drawn from stat = identity . How can I plot a normal pie chart like graph 2 with the angle proportional to proportion of cut ? I am using the diamonds data frame from ggplot2. ggplot(data = diamonds, mapping = aes(x = cut, fill = cut)) + geom_bar(width = 1) + coord_polar(theta = "x") Graph 1 ggplot(data = diamonds, mapping = aes(x = cut, y=..prop.., fill = cut)) + geom_bar(width = 1) + coord_polar

Silverlight Toolkit ; Pie Chart Colors

不问归期 提交于 2019-12-21 05:22:17
问题 I have a huge problem that I can't figure out. Let's say that I have five different fruits, and I want each of them to be associated with a certain color. Let's say that I have three "baskets" which contain zero or more of said fruits. When I Make Pie charts for my three baskets, Each wedge is just some random color that is presumable picked by the control. How would I say, make the blueberries blue, bannanas yellow, etc. in the chart? I know this is a weird question, but I can't think of a

Jquery Flot pie charts show data value instead of percentage

故事扮演 提交于 2019-12-20 11:14:34
问题 I can't figure out how to get flot.pie to change the data shown in the labels from a percentage of the "raw data" to the actual data. In my example i've created a pie chart with the numbers of read/unread messages. Number of read messages: 50. Number of unread messages: 150. The created pie shows the percentage of read messages as 25%. On this spot i want to show the actual 50 messages. See image below: The code i used to create the pie: var data = [ { label: "Read", data: 50, color: '#614E43

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

六月ゝ 毕业季﹏ 提交于 2019-12-20 10:58:25
问题 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 }

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

╄→гoц情女王★ 提交于 2019-12-20 10:58:17
问题 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 }

How to remove extra spacing from piechart?

亡梦爱人 提交于 2019-12-20 07:27:00
问题 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 回答1: 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 回答2: 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

How to plot pie chart in R from a table with relative Frequency?

徘徊边缘 提交于 2019-12-20 06:36:33
问题 I am brand new to R. I need to plot a pie graph. Now I have tried my best but it's not generating a pie chart for me. Below is my code. socialIssue <- matrix(c(245,112,153,71,133,306),ncol=1,byrow=T) rownames(socialIssue) <- c("Housing","Transportation","Health Care","Education","Food","Other") colnames(socialIssue) <- c("Frequency") socialIssue <- as.table(socialIssue) socialIssue/sum(socialIssue) cols <- rainbow(nrow(socialIssue)) pie(socialIssue$Frequency, labels=paste0(round(socialIssue

Crossfilter filters not filtering (dc.js)

╄→гoц情女王★ 提交于 2019-12-20 06:03:43
问题 I'm trying to use filters in crossfilter, but nope. Here's the JSBin Here's the most relevant code: var userDimension = data.dimension(function(d) {return d.user;}).filter(['John', 'Paul']); var totalSalesByUser = userDimension.group(); var pieChartUserSales = dc.pieChart("#pie-chart-sales-by-user"); pieChartUserSales .width(150).height(150) .dimension(userDimension) .group(totalSalesByUser); dc.renderAll(); The pie chart looks the same with and without the filter, but the effect I'm looking

matplot pie: rotate labels horizontally

馋奶兔 提交于 2019-12-20 05:36:11
问题 Using matplot to create a little gauge with the code below: group_size=[10,10,10,10,10,50] labels=['AAAA','BBBB','CCCC','DDDD','EEEE',''] fig, ax = plt.subplots() ax.axis('equal') pie = ax.pie(group_size, radius=2.2, colors=['k'] ,startangle=180,counterclock=False) pie2 = ax.pie([10,10,10,10,10,50], radius=2, labeldistance=0.7, labels=labels, rotatelabels = 270, startangle=180,counterclock=False) plt.show() I am trying to get the labels to go horizontally and align with the midpoint of each