pie-chart

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

和自甴很熟 提交于 2019-12-02 01:31:56
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? 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 charts side by side (which could be managed with two calls to pie ) and use segments or arrows (and text if necessary) to do the additional components of the plot. Here's a rough example: That required the fig argument of

d3 pie chart transition with attrtween

ぐ巨炮叔叔 提交于 2019-12-02 01:29:37
i'm trying to somehow sweep in a half-donut-chart, meaning starting with a blank screen the chart starts drawing at -90 degree (or 270) and performs a halfcircle until reaching 90 degree. the code looks like: var width = 800; var height = 400; var radius = 300; var grad=Math.PI/180; var data = [30, 14, 4, 4, 5]; var color = d3.scale.category20(); var svg = d3.select("body").append("svg").attr("width", width).attr("height", `height).append("g").attr("transform", "translate(" + radius*1.5 + "," + radius*1.5 + ")"); var arc = d3.svg.arc().innerRadius(radius - 100).outerRadius(radius - 20); var

Calculate angle for rotation in Pie Chart

纵饮孤独 提交于 2019-12-02 00:34:43
I want to rotate the image around its center point.The problem i am facing is i need to get the angle to calculate in touch moved event (i dont want to use multi touch).I am current using the below code - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{ NSArray *allTouches = [touches allObjects]; gestureStartPoint = gestureMovedPoint;//i am getting the gestureStartPoint on touch began event gestureMovedPoint = [[allTouches objectAtIndex:0] locationInView:[self superview]]; NSLog(@"gestureMovedPoint = %@",NSStringFromCGPoint(gestureMovedPoint)); } CGFloat previousAngle = [self

Dynamic Pie Chart Data in Javascript and PHP

て烟熏妆下的殇ゞ 提交于 2019-12-01 20:58:24
The following code represent the data that will be shown in a pie chart visualization in javascript. <script type="text/javascript"> var agg = { label: 'Aggressive', pct: [60, 10, 6, 30, 14, 10] }, bal = { label: 'Balanced', pct: [24, 7, 2, 18, 13, 36] }, mod = { label: 'Moderate', pct: [12, 4, 2, 10, 11, 61] }, inc = { label: 'Income', pct: [ 0, 0, 0, 0, 0,100] }, </script> I would like to have the pct values as php variables, and not fixed as in the code above. How do I do this? I would like to have it as var agg = <?php echo json_encode($data); ?>; $data being the php variable I would like

How to create a simple pie chart using python

≡放荡痞女 提交于 2019-12-01 20:30:27
Ive been trying to generate a simple pie chart using python just using two variables. representing percentages.I always encounter an error "vcvarsall.bat" not found upon installing matplotlib package.Is it inevitable installing visual studio for this? Visual Studio is not required to install matplotlib . For best results, first install Python from python.org, either 32- or 64-bit, depending on your computer's architecture and the version of Windows you're running (for example, even if you have a 64-bit processor, if you're running 32-bit Windows, download 32-bit Python). The version doesn't

Removing the white line between slices in Flot pie chart

烈酒焚心 提交于 2019-12-01 19:07:45
How can I remove the white line between slices and background in Flot pie chart ? My jsfiddle As you can see it looks like that: I want it to look like that(Ignore my bad artistic skills): My Code: $(function () { var data = [ { label: "Read", data: 50, color: '#614E43' }, { label: "Unread", data: 150, color: '#F5912D' }]; $.plot($("#star"), data, { series: { pie: { radius: 0.2, innerRadius: 0.125, show: true } } }); }); You can add the STROKE Property pie: { radius: 0.2, innerRadius: 0.125, show: true, stroke: { width: 0.1 } } Set the value to 0 totally hide the pie. So you could also add a

How can I show a subset of data on pie pieces in Chart.JS while still displaying the superset when hovering?

大兔子大兔子 提交于 2019-12-01 14:14:00
I've got a pie chart that looks like this when hovering over a piece of pie: Except for wanting the legend to the right instead of on top , I'm fairly content with this, but I want just the percentage value to display "all the time" in the pie pieces - and still have the <name> (<%val>): <data> displayed on hover. In other words, I want the pie to look something like this: How can I break that one piece of data out (the percentage) and draw that onto each piece of pie? Here is the code I'm using so far: var formatter = new Intl.NumberFormat("en-US"); var data = { labels: [ "Bananas (18%)",

Add legend to pie chart in dc.js

妖精的绣舞 提交于 2019-12-01 05:33:56
I'm building a dc.js-based visualization where one of the charts is a pie chart. See: http://jsfiddle.net/luiseth/t8we6/ The peculiarity of my case is that the labels that this chart will display are usually rather long, so much that usually get clipped by the chart's container (the <div> ). So I thought of having them appear on a legend, but I haven't been able to figure how to have the legend appear to the right of the chart. How can I do that? Playing around with the width has not helped at all, since the chart gets positioned at the center of the <div> . My code at the moment is: chart

Highcharts pie dataLabels inside and outside

南楼画角 提交于 2019-12-01 04:17:54
i want a pie-chart with datalabels inside and outside a pie. i know, with a negative distance it shows the label inside the pie. but i want it inside and outside. outside i want display the percentage and inside the total sum of the point. Sebastian Bochan You have no possibility to set double datalabels, but you can use workaround, which is not perfect but maybe will be helpful. So you can set useHTML, then in formater return two divs, first appropriate datalabel (outside) and second with inside. Then set id with counter which define each div's id as unique, then only what you need is set

ASP.Net MS Chart Control Pie Chart: remove unwanted padding

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 03:21:19
HI im trying to create simple pie chart using the MS Chart controls. When my pie chart gets rendered in the browser i get padding around the pie chart that i cant get rid of. i would like the pie chart to sit up against the edge of the image with no padding or margin. Any ideas on how i can achieve this? in my code below the padding is highlighted in blue. i.e Chart1.BackColor = System.Drawing.Color.Blue; <script type="text/C#" runat="server"> protected void Page_Load(object sender, EventArgs e) { //Set the chart type Chart1.Series["Series1"].ChartType = SeriesChartType.Pie; //add points