Questions tagged [stacked-chart]

For questions about stacked charts, i.e. charts where multiple data series are superimposed.

Stacked are charts in which you collect multiple data series and display their cumulative values. These can be stacked histograms, stacked areas, or a number of other arrangements.

Stacked areas Stacked areas adding up to 100% 3d example Stacked area chart

Typical questions involve how to get this sort of layout from various plotting engines and how to affect details like legends, orientation, color palette, grouping, etc.

674 questions
3
votes
1 answer

how to plot multiple area plots with ggplot2?

I am trying to achieve a complex data viz like in the picture bellow. But with R and ggplot2. As observed: there are 6 different groups "Africa", "Asia", "Europe", etc, above each sets of data visualisation; 1 set comprising of 3 area plots per…
GaB
  • 1,076
  • 2
  • 16
  • 29
3
votes
3 answers

Create 100% stacked bar chart

I need to generate a 100% stacked bar chart, including the % of the distribution (with no decimals) or the number of observations. My dataset looks like this: I need to generate a different one that counts the amount of actives and lates per…
Agustina
  • 91
  • 1
  • 1
  • 6
3
votes
1 answer

Sort stacked graphs in the y axis

I'm using a stacked graph in AWS quicksight and I need to be able to sort by Cost vertically. The only option I see is to sort by Cost horizontally making the dates appear out of order. By default it's sorted A-Z vertically. How can I get the larger…
3
votes
1 answer

How to get bar chart data label to display both value and percent (of total) in google sheets?

In a 100% stacked bar chart, how can I get the data label to display BOTH the value AND the percent of total? Example: 129 (60.3%) This is displayed in the tooltip when you hover over the bar, but not visible on the bar itself. Example here:…
Andrew Frye
  • 31
  • 1
  • 1
  • 3
3
votes
2 answers

How to arrange the x axis lables wihtout overlapping in victory-native stacked bar chart

I have a stacked bar chart, whose x axis labels would be date, the labels are overlapping how do I arrange them in such a way that it does not overlap on the next label of x axis. I did not get how to arrange them changing the angle of the label,…
Prajna
  • 578
  • 4
  • 8
  • 23
3
votes
1 answer

Format internal lines of stacked geom_bar inside geom_tile ggplot2

this may relevant to this question: format-internal-lines-of-a-stacked-geom-bar-ggplot, but I still can not solve it since I am still beginner. I have many stacked bar for this plot, here is just sample data. I just want to keep external border and…
mjberlin15
  • 147
  • 1
  • 10
3
votes
2 answers

How to calculate percent by row and annotate 100 percent stacked bars

I need help adding the percent distribution of the total (no decimals) in each section of a stacked bar plot in pandas created from a crosstab in a dataframe. Here is sample data: data = { …
Marie10
  • 141
  • 3
  • 8
3
votes
1 answer

How to suppress zero in stacked bar graph display

I have a sample stacked bar char as below. How can i suppress "0" values in the chart wherever i have 0 i dont want to display the values. Is there any way i can suppress zero I have below code while displaying data for xpos, ypos, yval in…
Ravi
  • 793
  • 3
  • 16
  • 29
3
votes
1 answer

ggplot2 stacked bar, put NA on top

The answer here had lots of great information about ordering bar sections in a stacked bar chart. After futzing with various alternatives, and getting mostly the order I want, NA keeps showing up on the bottom of the stack, which I don't…
Sigfried
  • 2,943
  • 3
  • 31
  • 43
3
votes
1 answer

stacks bar graph within grouped and and without the sub-grouped plot

Someone already explained stacked bars within grouped bar chart here test <- data.frame(person = c("group 1", "group 2", "group 3"), value1 = c(100, 150, 120), # male value2 = c(25, 30, 45) , # female …
Tevfik K
  • 33
  • 2
3
votes
2 answers

R: Stacked area chart does not stack

I have data which I want to plot as a stacked area plot. On the x-axis I have data which is continuous and on the y axis I have continuous data which I prepare to be cumulative. This is the code I am using with some dummy…
lmz
  • 366
  • 3
  • 13
3
votes
1 answer

Alignment Error When Using Stacked Bars

I'm using a Stacked bars visualisation on one of my Spotfire pages, but whatever the reason, the bars start to get misaligned with the axis as can be seen on the attached image: The event Start Time is 125.45, but is been shown after 125.5. A…
Oliver Drummond
  • 680
  • 1
  • 6
  • 19
3
votes
0 answers

Zoom & Brush in Stacked Area Chart

Playing with Mike's Zoom & Brush. How to change this when my area is stacked? In this case I use layer function var layer = svg.selectAll(".layer") .data(stack(values)) .enter().append("g").append("path") .attr("class", "layer") …
3
votes
2 answers

Using a Custom Color Palette in Stacked Bar Chart

So am trying to create a stacked bar chart where all of the slices of the chart will remain constant throughout the program, but I cannot figure out how to get df.plot to use a custom palette. I want to make sure that if I do 20 different reports…
3
votes
2 answers

Creating percentage stacked bar chart using groupby

I'm looking at home ownership within levels of different loan statuses, and I'd like to display this using a stacked bar chart in percentages. I've been able to create a frequency stacked bar chart using this…
yogz123
  • 703
  • 3
  • 8
  • 25
1 2
3
44 45