pie-chart

jfreechart customize piechart to show absolute values and percentages

不打扰是莪最后的温柔 提交于 2019-12-17 07:48:12
问题 How can this compilable minimal code snippet example, which uses JFreeChart as plotting API, adapted in order to show both absoulte values AND percentages ? I couldn't extract this information neither from any code snippet on the internet nor from the JFreechart manual itself. The code snippet produces a pie chart showing only percentages. The absolute values in my case also matter, so i need to display them right under the percentages. Here is the code: (Note it lacks the imports) public

Label outside arc (Pie chart) d3.js

依然范特西╮ 提交于 2019-12-17 05:41:05
问题 I'm new to d3.js and I"m trying to make a Pie-chart with it. I have only one problem: I can't get my labels outside my arcs... The labels are positioned with arc.centroid arcs.append("svg:text") .attr("transform", function(d) { return "translate(" + arc.centroid(d) + ")"; }) .attr("text-anchor", "middle") Who can help me with this? 回答1: I can solve that problem - with trigonometry :). See fiddle: http://jsfiddle.net/nrabinowitz/GQDUS/ Basically, calling arc.centroid(d) returns an [x,y] array.

Label outside arc (Pie chart) d3.js

泪湿孤枕 提交于 2019-12-17 05:40:16
问题 I'm new to d3.js and I"m trying to make a Pie-chart with it. I have only one problem: I can't get my labels outside my arcs... The labels are positioned with arc.centroid arcs.append("svg:text") .attr("transform", function(d) { return "translate(" + arc.centroid(d) + ")"; }) .attr("text-anchor", "middle") Who can help me with this? 回答1: I can solve that problem - with trigonometry :). See fiddle: http://jsfiddle.net/nrabinowitz/GQDUS/ Basically, calling arc.centroid(d) returns an [x,y] array.

ggplot, facet, piechart: placing text in the middle of pie chart slices

本小妞迷上赌 提交于 2019-12-17 02:12:09
问题 I'm trying to produce a facetted pie-chart with ggplot and facing problems with placing text in the middle of each slice: dat = read.table(text = "Channel Volume Cnt AGENT high 8344 AGENT medium 5448 AGENT low 23823 KIOSK high 19275 KIOSK medium 13554 KIOSK low 38293", header=TRUE) vis = ggplot(data=dat, aes(x=factor(1), y=Cnt, fill=Volume)) + geom_bar(stat="identity", position="fill") + coord_polar(theta="y") + facet_grid(Channel~.) + geom_text(aes(x=factor(1), y=Cnt, label=Cnt, ymax=Cnt),

Create several pie charts in R from lists

廉价感情. 提交于 2019-12-14 03:56:28
问题 I want to create several pie charts at once, I have a list of the names: [1] 361 456 745 858 1294 1297 2360 2872 3034 5118 5189... So the first pie chart should be labeled '361', and so on. Then I have several lists with values for each pie chart [1] 102 99 107 30 2 8 24 16 57 117 ... [1] 1 1 2 1 0 0 0 1 1 2 ... [1] 4 2 2 1 3 0 0 1 1 2 ... So for '361', the first element is 102, the second is 1 and the third is 4. The total is 107. I want to do all of the charts at once. 回答1: One way to get

Remove white space in a multiple panel structure (16 graphs) to make pie charts bigger

烂漫一生 提交于 2019-12-14 02:56:54
问题 EDIT: I am struggling with the title of this post since I am not sure anymore whether the white space is the problem. My main concern is that the pie charts are too small and I wanted to enlarge them by filling up the white margins in between them. Not sure whether this means that the pie charts are the problem, or whether the margins are! I made the following graph: However, the pie charts are way too small to be of added value to this graph. I gave them a grey background and in that way it

Jquery flot piece edges broken

末鹿安然 提交于 2019-12-14 02:32:51
问题 I have drawn a pie chart using jquery flot pie, but its edged at the top and bottom are somewhat slightly cut I didn't change anything (except data) from when I bought this Wrap bootstrap theme and as you can see it also has this problem in all pie charts. What could be the reason for this to happen? 回答1: Apparently this got fixed with a newer combination of plugins: v0.7 to v0.8 of jquery.flot.js and v1.0 to v1.1 of jquery.flot.pie.js 来源: https://stackoverflow.com/questions/21421614/jquery

Does it support 3D pie chart?

隐身守侯 提交于 2019-12-14 00:50:04
问题 I am using Highcharts on my web, and I have the need for a 3D pie chart. Does Highcharts support 3D pie charts? If so can someone show an example? 回答1: It's the top most requested feature http://highcharts.uservoice.com/forums/55896-general and it looks like is is coming this year. Meanwhile, you can add radial gradients. http://jsfiddle.net/LCdVd/243/ --- Update --- 3D pie charts are now supported: http://www.highcharts.com/demo/3d-pie 来源: https://stackoverflow.com/questions/15597268/does-it

Loading multiple Flot pie charts from external js file as needed

纵然是瞬间 提交于 2019-12-13 19:57:01
问题 Using Flot to create a whole bunch of pie charts across a site. I'm finding that if a chart is defined, but on a given page the div it's assigned to isn't there or doesn't have the height/width set, that chart and all those defined thereafter do not display. The issue is that some charts are needed in some pages and not in others. I'd like to define the charts all in one place and place them in their appropriate views as needed, but with Flot Pie it seems that as soon as the script comes up

Google pie chart single value

一笑奈何 提交于 2019-12-13 18:55:18
问题 I am using a Google Pie Chart and have a problem modifying it. After many complicated calculations I get a percentage value, say 67%. I want that single percentage value to be shown in pie/donut chart. My HTML code is <div id="chart_div"></div> My Javascript code is function drawChart() { var data = google.visualization.arrayToDataTable([ ['Category', 'Value'], ['Foo', 67] ]); var chart = new google.visualization.PieChart(document.getElementById('chart_div')); chart.draw(data, { height: 400,