pie-chart

Loop over JSON data to create d3 pie charts

余生长醉 提交于 2019-12-12 19:16:24
问题 I've succeeded in creating my first pie chart with d3 and JSON, but I'm struggling to get more than one pie chart to appear. I've reviewed numerous examples, including Mike Bostock's donut-multiples, and it appears I need a for-each loop in my code. Here's a simplified version of my program which produces one pie chart instead of two: <!doctype html> <html> <head> <title>Pie Chart Test</title> <meta charset="UTF-8"> <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"><

Change autopct label position on matplotlib pie chart

心已入冬 提交于 2019-12-12 16:17:29
问题 I'm plotting some pie charts in matplotlib and the percentage labels on some of my charts overlap each other and look messy. Is there a way to change the position of the text so it is all readable? And example of what I'm getting is below - the category 'Others' and 'ALD2_OH' are overlapping and are unreadable. My plotting code is here: matplotlib.rcParams.update({'font.size': 18}) plt.figure(figsize=(11,11)) labels = ['ALD2 + OH','PAN + $therm$','ALD2 + NO$_3$','ATOOH + $hv$', 'Others',]

Converting bar chart to pie chart in R

自作多情 提交于 2019-12-12 16:05:35
问题 I have following data and code: dd grp categ condition value 1 A X P 2 2 B X P 5 3 A Y P 9 4 B Y P 6 5 A X Q 4 6 B X Q 5 7 A Y Q 8 8 B Y Q 2 > > dput(dd) structure(list(grp = structure(c(1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L), .Label = c("A", "B"), class = "factor"), categ = structure(c(1L, 1L, 2L, 2L, 1L, 1L, 2L, 2L), .Label = c("X", "Y"), class = "factor"), condition = structure(c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L), .Label = c("P", "Q"), class = "factor"), value = c(2, 5, 9, 6, 4, 5, 8, 2 )), .Names

Change the appearance of the title of a Core Plot pie chart

久未见 提交于 2019-12-12 12:35:41
问题 I would like to use a plain black background to my pie chart which I generate using Core Plot. I have the chart rendering nicely but the title is in a default blackColor which is hard to see on a black background. I know it's displaying because when I change the theme I can see it in black. Can anyone tell me how to change the text colour as I did with the data labels? Here is a snippet of my code... graph = [[CPTXYGraph alloc] initWithFrame:self.view.bounds]; CPTGraphHostingView *hostingView

What is the correct Xcode setting for Position Independent Executables

烈酒焚心 提交于 2019-12-12 12:17:44
问题 Just recently started getting a post appstore submission email with the following advice. Please ensure that your build settings are configured to create PIE executables. However the setting in XCode appears correct, In the linking section I found "Don't Create Position Independent Executables" which is set to NO. (Double negatives YUK). 回答1: You may be receiving this Apple warning not because your Application itself, but because a 3rd party library that was not compiled as PIE. For example,

How to Alligned text on Piechart (or) piechart slice center?

早过忘川 提交于 2019-12-12 09:29:54
问题 I want add Text in Piechart. UIGraphicsPushContext(context); CGContextMoveToPoint(context, newCenterX, newCenterY); CGContextAddArc(context, newCenterX, newCenterY, radius,arcOffset-(myAngle/2),arcOffset+(myAngle/2), 0); UIColor *color = [PIECHART_COLORS objectAtIndex:i%6]; CGContextSetFillColorWithColor(context, color.CGColor); CGContextClosePath(context); CGContextFillPath(context); CGMutablePathRef arcPath = CGPathCreateMutable(); CGPathAddArc(arcPath, NULL, self.frame.size.width/2, self

Include values to the barplot and pie charts in R

爱⌒轻易说出口 提交于 2019-12-12 05:56:01
问题 I have data in this form: proprete.freq <- table(cnData$proprete) proprete.freq.genre <-table(cnData$genre,cnData$proprete) I am using these functions (barplot and pie) to plot the data: barplot(proprete.freq.genre, col = heat.colors(length(rownames(proprete.freq.genre))) , main="Proprete", beside = TRUE) pie(proprete.freq, col=rainbow(3), names.arg=avis, main="Propreté") Here is the result: Question : How to include the value just on top of the barplots and below the categorical variables

Creating an incomplete pie chart in Dimple.JS

六月ゝ 毕业季﹏ 提交于 2019-12-12 05:30:06
问题 I have a pie chart that needs to have a missing 10% missing slice. I have the following code but the pie is always 100%. var myChart = new dimple.chart(svg, data); myChart.setBounds(50, 50, 180, 180); myChart.defaultColors = chartOptions.colors; myChart.data.startAngle = 0; myChart.data.endAngle = (2 * Math.PI * 0.9); myAxis = myChart.addMeasureAxis('p', 'amount'); var mySeries = myChart.addSeries('legend', dimple.plot.pie); How do I make the pie less than 100%? The above example needs to

Retrieve attributes of raphael pie chart

依然范特西╮ 提交于 2019-12-12 04:37:17
问题 How to get the attributes of raphael pie chart: attributes like: stroke, values (not with legend), radius, x and y position My pie chart is defined as: pie = r.piechart(120, 140, 50, [55, 22], { colors: ["green","red"], stroke: "black" }); I tried: this.stroke -- says undefined // I know this is getting me the raphael object correctly since I am doing some work also this.click(function () { alert(this.stroke); }); this.attr('stroke'); -- does not even display undefined Any idea how to solve

RaphaelJs Pie Chart Animation on Hover

孤街浪徒 提交于 2019-12-12 04:08:15
问题 i am customizing the pie chart given on the raphael site below link http://raphaeljs.com/pie.html this chart shows animation when hover a slice, this animation simply expand the slice a little what i want is to separate the slice from the chart i played with the transform property of following lines of code but could not make it as i want. p.mouseover(function () { var xis= p.getBBox(true); p.stop().animate({transform: "s1.1 1.1 "+ cx + " " + cy }, ms, "linear"); txt.stop().animate({opacity: