pie-chart

How do I externalize my d3 v4 pie chart labels?

坚强是说给别人听的谎言 提交于 2019-12-18 09:17:48
问题 I'm using d3 v4. I want to move tabels out of my pie chart and have them point at the pie chart instead (because for small wedges it is not possible to read the labels). I thought this would add external labels // Now we'll draw our label lines, etc. enteringLabels = labels.selectAll(".label").data(data).enter(); labelGroups = enteringLabels.append("g").attr("class", "label"); labelGroups.append("circle").attr({ x: 0, y: 0, r: 2, fill: "#000", transform: function (d, i) { centroid = pied_arc

Add a line chart beneath an existing pie chart

跟風遠走 提交于 2019-12-18 09:10:54
问题 When I click on a section of my piechart, I would like to see under first chart another chart (line chart). Now I generated another panel chart, but I lost first panel, because the second chart paint on first panel and second paint a first chart, but second has bad dimension; see image. How i can adjust my problem? JFreeChart chart = ChartFactory.createPieChart("Pratiche complessive", dataset, true, true, false); ChartPanel chartPanel = new ChartPanel(chart); chartPanel.setPreferredSize(new

How to fix chart Legends width-height with overflow scroll in ChartJS

帅比萌擦擦* 提交于 2019-12-18 06:08:46
问题 I want to create pie chart for my project, so I am using ChartJS for it, but there are some issues with chartJS, If I am work with 10 to 20 data-field that time chart is looks good, But when I am apply more than 50 to 60 data-field in one chart, So that chart is looks smaller instead of legends, and If sometimes data-field is too much than the chart is hide, you can see only legends, chart is gone. I want to set height or width to that legends and also apply to scrollbar if there is more data

How to add Percentage and Total on the Legend of Google Pie Charts

白昼怎懂夜的黑 提交于 2019-12-18 04:42:17
问题 I have a page that displays data in a form of a Pie Chart. I use Google Charts to do this. Here's the code: <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("visualization", "1", {packages:["corechart"]}); google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Goal Name', 'No. of times Requested'], ['Frank.net Life Cover', 226], ['Frank.net Hospital Cash Back', 147]

Displaying decimal places on primefaces pie chart

冷暖自知 提交于 2019-12-18 04:29:18
问题 I would like to check how do I display decimals for primefaces ver 3.3 pie chart label? Currently, there are two proportions in my chart. Label A and Label B. Label A has a very big number like 100000 but label B has 100. Therefore, in the pie chart, Label A is not 100%. However, primefaces converts this to 100% which is wrong. Is there any way I can show the decimal places instead of whole numbers as labels on the pie chart? 回答1: Define an extender function like: function ext() { this.cfg

HighCharts Pie Chart - Add text inside each slice

社会主义新天地 提交于 2019-12-18 04:13:00
问题 I am creating a financial pie chart using HighCharts that represents asset allocation. My goal is to create a chart that represents the actual allocation values in each slice but inside each slide will show essentially a second data label that displays the target percentage for various investment vehicles. It is important to note that the current asset allocation may not always match up with the targeted allocation value. I have gotten everything working except for the Target labels inside

faceted piechart with ggplot2

江枫思渺然 提交于 2019-12-17 20:28:58
问题 I've done a faceted piechart with ggplot2 like this: qplot(x=factor(1), data=mtcars, fill=factor(cyl)) + geom_bar(width=1) + coord_polar(theta="y") + facet_grid(~gear) but as all the piecharts share the y axis scale, some of them doesn't cover the full circle. I've tried with facet_grid(~gear, scales="free") but it doesn't work. How could I get full circles for all the piecharts? 回答1: I think you just want position = 'fill' : ggplot(mtcars,aes(x = factor(1),fill=factor(cyl))) + facet_wrap(

Adding percentage labels on pie chart in R

淺唱寂寞╮ 提交于 2019-12-17 19:53:43
问题 My data frame looks like df Group value 1 Positive 52 2 Negative 239 3 Neutral 9 I would like to make a pie chart of the data frame using ggplot. pie <- ggplot(df, aes(x="", y=value, fill=Group)) + geom_bar(width = 1, stat = "identity") + coord_polar("y", start=0) This is my pie chart. But when I try to add percentage labels on the chart pie <- ggplot(df, aes(x="", y=value, fill=Group)) + geom_bar(width = 1, stat = "identity") + coord_polar("y", start=0) + geom_text(aes(y = value/2 + c(0,

adding tooltips to pie chart using d3.js

痴心易碎 提交于 2019-12-17 19:50:55
问题 I am embarking on a journey to learn to visualize data using d3.js, and so far I am finding the "Interactive Data Visualization" by Scott Murray very helpful. I was following through some of the example codes in book chapter 11, and was wondering how I would add the tooltip to the pie chart (the book already describes this procedure using the bar chart). Anyways, just been tinkering around with the codes for past couple of hours and would like to see if anyone can lend me a hand on this: <

jfreechart customize piechart to show absolute values and percentages

本小妞迷上赌 提交于 2019-12-17 07:49:16
问题 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