donut-chart

Open Pie Chart/Donut Chart in R using Plotly with count and percentage

此生再无相见时 提交于 2019-12-12 00:55:11
问题 I'm trying to make a donut chart in R using plotly. I tried ggplot, but it wasn't able to give me the effect that I need. Here's a sample dataset: library(dplyr) testfile <- tibble(personID = 1:10, status = c("bad", "good", "bad", "bad", "bad", "bad", "bad", "bad", "bad", "good"), department = c("sales", "sales", "marketing", "sales", "marketing", "management", "management", "sales", "sales", "sales")) This chart will end up in a PowerPoint, so it does not need to be responsive. Instead, I

D3 donut chart legend or labels on hover

懵懂的女人 提交于 2019-12-11 12:12:23
问题 I've created a chart using D3.js here (http://jsfiddle.net/jkuchta/u57mt97c/) but I'm running into issues with the labels. How could I add a legend to this or have the labels only appear on hover? // DRAW SLICE LABELS var sliceLabel = label_group.selectAll("text") .data(donut(data.pct)); sliceLabel.enter().append("svg:text") .attr("class", "arcLabel") .attr("transform", function(d) {return "translate(" + arc.centroid(d) + ")"; }) .attr("text-anchor", "middle") .text(function(d, i) {return

D3.js - Donut charts with multiple rings and animation transition

对着背影说爱祢 提交于 2019-12-10 13:57:37
问题 How can you add a transition animation effect to the following D3 chart with multiple rings? As shown here D3.js - Donut charts with multiple rings var dataset = { apples: [53245, 28479, 19697, 24037, 40245], oranges: [53, 28, 19, 24], lemons: [53245, 28479, 19697, 24037, 40245], pears: [53245, 28479, 19697, 24037, 40245], pineapples: [53245, 28479, 19697, 24037, 40245], }; var width = 460, height = 300, cwidth = 25; var color = d3.scale.category20(); var pie = d3.layout.pie() .sort(null);

Pie (donut) chart segment order in D3

心不动则不痛 提交于 2019-12-08 15:38:27
问题 I have a donut chart built using d3 with a jQuery slider that allows a user to select between different data-points. The chart animates the transition between data values and all is well. The problem: The segments always render in anti-clockwise size order (from largest to smallest). This means that segments switch their position around the chart depending on their size. This behaviour is confusing for users, but unfortunately I can't work out how to change it. I would like the segments to

ggplot donut chart percentage labels

五迷三道 提交于 2019-12-07 03:50:52
问题 I'm trying to add percentage labels to a donut chart but have been unsuccessful in plotting a clear representation of percentage values (rounded and not overlapping) ## my data library(ggplot2) col <- c("white", "black", "transparent", "grey", "blue", "yellow", "green", "red", "pink", "orange", "brown") freq <- c(101, 68, 34, 18, 14, 5, 5, 3, 2, 1, 1) ## create data frame colour.df <- data.frame(col, freq) colour.df ## calculate percentage colour.df$percentage = colour.df$freq / sum(colour.df

ggplot2: How to add percentage labels to a donut chart

前提是你 提交于 2019-12-07 01:17:57
问题 I am pretty new to R... so forgive me. I'm trying to make donut plots using ggplot2. I have modified the code of the post ggplot Donut chart but now I'm not able to add the percentage on the chart. This is my attempt: library(ggplot2) blank_theme <- theme_minimal()+ theme( axis.title.x = element_blank(), axis.title.y = element_blank(), panel.border = element_blank(), panel.grid=element_blank(), axis.ticks = element_blank(), plot.title=element_text(size=14, face="bold") ) dat = data.frame

ggplot donut chart percentage labels

核能气质少年 提交于 2019-12-05 07:44:55
I'm trying to add percentage labels to a donut chart but have been unsuccessful in plotting a clear representation of percentage values (rounded and not overlapping) ## my data library(ggplot2) col <- c("white", "black", "transparent", "grey", "blue", "yellow", "green", "red", "pink", "orange", "brown") freq <- c(101, 68, 34, 18, 14, 5, 5, 3, 2, 1, 1) ## create data frame colour.df <- data.frame(col, freq) colour.df ## calculate percentage colour.df$percentage = colour.df$freq / sum(colour.df$freq)* 100 colour.df = colour.df[rev(order(colour.df$percentage)), ] colour.df$ymax = cumsum(colour.df

Is it possible to insert an icon in the arc of a donut chart with D3?

烈酒焚心 提交于 2019-12-05 05:35:40
问题 I have a Donut Chart with 3 categories (arcs): Facebook (50%), Twitter(30%) and Instagram(20%). Plot the chart is fairly easy, but I want to know how to insert an icon in each arc with the respective symbol of the social network (using D3 or even C3). Thanks! 回答1: Adding an image is just a case of using ... .append("svg:image") .attr("xlink:href","myimage.png") .attr("width", "32") .attr("height", "32"); You'll also need to position ( x and y ). These will default to 0, so you could

ggplot2: How to add percentage labels to a donut chart

半世苍凉 提交于 2019-12-05 05:21:52
I am pretty new to R... so forgive me. I'm trying to make donut plots using ggplot2. I have modified the code of the post ggplot Donut chart but now I'm not able to add the percentage on the chart. This is my attempt: library(ggplot2) blank_theme <- theme_minimal()+ theme( axis.title.x = element_blank(), axis.title.y = element_blank(), panel.border = element_blank(), panel.grid=element_blank(), axis.ticks = element_blank(), plot.title=element_text(size=14, face="bold") ) dat = data.frame(count=c(319, 442, 239), category=c("University", "High Scool", "Lower")) dat$fraction = dat$count / sum(dat

How to set Image inside of Donut-achartEngine Graph?

蹲街弑〆低调 提交于 2019-12-04 15:32:32
问题 I am using aChartEngine Library to make donut graph.But having problem to add image inside of donut Graph. I can set Background Color only , but not get able to set background image inside of donut. Please check image . 回答1: This could help.. <RelativeLayout android:layout_width="match_parent" android:layout_height="170dp" > <LinearLayout android:id="@+id/left_graph_for_head_injury" //here to draw donut android:layout_width="match_parent" android:layout_height="170dp" > </LinearLayout>