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
5
votes
1 answer

100% Stacked Bar Chart in MatPlotLib

I'm trying to create a 100% Stacked Bar Chart in MatPlotLib using the College Scorecard data from this site. There are 38 columns that are: Percentage of degrees awarded in [insert area of study here] This explains why there are 38 fields! And I…
tangerine7199
  • 443
  • 2
  • 8
  • 24
5
votes
2 answers

Data tooltips in Bokeh don't show data, showing '???' instead

Note from maintainers: this question concerns the obsolete bokeh.charts API that was removed several years ago. See this section for information about hover tools with Bar charts in modern…
Uri
  • 51
  • 1
  • 5
5
votes
2 answers

Text On each bar of a stacked bar chart d3.js

I would like to have some text in each bar of a stacked bar in stacked bar chart provided in d3.js library. Thanks for your help. I have customized the example here link but I have not changed anything else in the javascript code and here is the…
user2401221
  • 519
  • 2
  • 9
  • 19
4
votes
1 answer

R ggplot Sort Percent Stacked Bar Chart

I am attempting to sort a ggplot based on the "good" Percentage. Below is a data frame that I am working with. Also What I am getting now and what I would like to have ideally. library(ggplot2) a <- c("Nevada", "Maine", "North Carolina", "South…
BBWesley
  • 43
  • 3
4
votes
1 answer

Stacked bar chart, reorder by total (sum up of values) instead of value ggplot2 + dplyr

I need to stack ETT by band for each ISO3, plus reorder ISO3 by the total sum-up of the values in each ISO3. So far, the stack is working ok, but the reorder is the issue. The code is reordering by individual ETT values (instead of sum-up of ETT…
Diego Moya
  • 123
  • 10
4
votes
1 answer

Multirow axis labels with nested grouping variables for stacked bar plot in - R

I would like to make a stacked bar graph with multiple categories with a nested labelled X-axis using ggplot, similar to the one I've made using Excel as shown here. I tried using the example given here for an unstacked bar graph using…
William Zappa
  • 43
  • 1
  • 5
4
votes
2 answers

Overlapping and rounded stack in stacked column graph in Highcharts

I am trying to achieve something like column 2014 but I haven't found a way to provide layering like this. This is a fiddle of what I have till now. I need to make a stacked column graph that looks like either 2014 column or 2015 column.(which…
mukesh.kumar
  • 1,100
  • 16
  • 30
4
votes
1 answer

Combine Grouped and Stacked Bar Graph in R

The following is how my data frame looks like: CatA CatB CatC 1 Y A 1 N B 1 Y C 2 Y A 3 N B 2 N C 3 Y A 4 Y B 4 N C 5 N …
Ankur Sinha
  • 6,473
  • 7
  • 42
  • 73
4
votes
1 answer

d3 v4 nested data and stacked bar chart

I am trying to make a chart that looks like this: I have a D3.nest data structure that looks like this: {"key":"Area 1","values":[ {"key":"5. Validation Complete","value":12.5}, {"key":"Deferred","value":1}, {"key":"3. Identify &…
Bryan B.
  • 81
  • 1
  • 8
4
votes
1 answer

How to show calculated values on top of stacked bar chart in r

Using the code below, I have a stacked bar chart as shown. myDF <- structure(list(Group = structure(1:3, .Label = c("2017-04-02", "2017-04-09", "2017-04-16"), class = "factor"), Passive = c(4, 1, 0), Promoter = c(12, 1, 4), Detractors = c(0, 0,…
krish
  • 1,388
  • 2
  • 18
  • 28
4
votes
0 answers

r-legend in stacked bar plot

I'm relatively new to R and struggling to get my legend in the correct place. I've had a good look online and just can't seem to figure it out. # rating no yes # 1 140 38 # 2 72 46 # 3 46 62 # 4 42 140 # 5 16 …
N Gross
  • 41
  • 1
  • 2
4
votes
0 answers

Highcharts stacked column chart dynamic json data format

i am working on stacked bar charts using highcharts js api. i am getting x-axis and y-axis data altogether in json format. then i process on that json data to separate x-axis and y-axis with series name. here is the data that am getting from…
Dev001
  • 276
  • 1
  • 7
  • 25
4
votes
2 answers

Matlab, graph two data series in one graph

In MATLAB, is it possible to create a single graph of two related data sources with the first source plotted along the bottom of the x-axis and the 2nd source plotted down from the top of the x-axis? I can't find anywhere in the MATLAB documentation…
AaronThomson
  • 763
  • 8
  • 19
4
votes
2 answers

Overlapping stacked density plots

I'm trying to achieve a similar plot to this one, using R's native plot command. I was able to get something similar with the code below, however, I'd like the density polygons to overlap. Can anyone suggest a way to do this? data = lapply(1:5,…
Omar Wagih
  • 8,504
  • 7
  • 59
  • 75
3
votes
1 answer

Chart.js v3: Tooltip callback doesn't identify clicked dataset of stacked bar chart

In Chart.js v2, the datasetIndex property of ChartTooltipItem[] identifies which segment of a stacked bar chart was clicked. This allowed the tooltip content to be customized for each segment of the stacked bar chart. In v3, TooltipItem[] provides…
1
2
3
44 45