Questions tagged [stacked-bar-chart]

A stacked bar chart is a graphical representation of data where, for each categorical group, there are two or more bars colored to represent a particular grouping. The value is represented by the length of the bar segment.

247 questions
0
votes
1 answer

Why is my D3.js stacked bar chart not showing accurately

I am creating a stacked bar chart in d3.js, and I am having a few problems. My chart looks like this (created in D3.js): but it should look something like this (created with Observable.Plot): How can I change my code to: Show the bars on the X…
Adam
  • 21
  • 3
0
votes
1 answer

Changing the chart color dynamically based on value in gs

I'd like to change the color of the stacked bar chart based on the changing values in google sheets. Currently the color is set and what I'm trying to accomplish is to set conditional formatting for chart color. In other words, if the change in…
Max S.
  • 1
  • 1
0
votes
1 answer

Displaying value and percentage on a stacked bar chart in Cognos 11.1.7

Can both the data value and the percentage be displayed when hovering over a stacked bar chart in Cognos 11.1.7?
0
votes
1 answer

Customize Each Row of Stacked Horizontal bar plot by percentage

I have data similar in structure to the data below, which I used to create the horizontal stacked bar plot below. What I would like is for each individual horizontal bar (for each of the types 1 through 4) to be ordered in such a way that the fill…
0
votes
0 answers

Unequal Y Axis Point in Recharts Library of React.js

I wants to know that if there is any way to plot unequal scale of Y Axis in the Recharts Library of React.js Like in the example in the image Link for the image: https://i.stack.imgur.com/ZyF49.png it is an example of Stacked Bar Charts Area of all…
Hamza
  • 1
  • 1
0
votes
0 answers

Kendo Angular - 100% stacked bar chart - how to show percentages as labels in the bar?

How do I display the auto generated percent value as label in the bars? I have a bar chart with [stack]="{ type: '100%' }". I would like to display the percentage as label in the bar. Picture of expected chart label Picture of My chart label I…
0
votes
0 answers

trying to save the figure of stacked bar chart in canvas widget

I grouped the data and tried for a stacked bar chart and it worked fine the figure is also plotted in the interpreter with an ipynb jupyter notebook file as show in the picture attached, but when I want to use that figure in the canvas of…
0
votes
1 answer

How to plot a stacked bar graph for 1d data(series) using plotly low level interface?

I am trying to replicate a stacked bar graph of a 1d data(series), something like this, stacked bar graph using plotly high level using plotly low level interface. I have used high level interface to get the above output. Below is the code I…
Maran
  • 68
  • 5
0
votes
1 answer

Changing the order of elements in stacked barchart by filter with ggplot2

I would need some help with a Likert-scala bar chart that I created using ggplot2. Here is the data frame: structure(list(Q4_ROLE = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L), levels =…
0
votes
2 answers

ggtitle not printing variable name in R function

I have created an R function to create stacked boxplots so I can change the variables to create different plots. However, when it comes to printing the title (either ggtitle or labs(title)), the function cannot identify the SNP variable. Error in…
Balegde
  • 1
  • 2
0
votes
1 answer

Conditionally change panel background with facet_grid with stacked/grouped bar plot?

I'm modifying a stacked/grouped bar plot and would like to change the panel/background color based on the year. Here's the data that I'm working with, a data frame called melted. Year D_or_I Value Scenario 2023 MPO D 7350 MPO 2024 MPO…
Nate
  • 1
  • 1
0
votes
2 answers

How can I re-order my percent stacked barchart in R based on descending stack segment height?

I'm trying to order the bars of my percent stacked barchart in R based on descending stack segment height. R automatically sorts my categorical data in alphabetical order (in both the barchart and its legend) but I'd like the data to be ordered so…
Devon
  • 17
  • 3
0
votes
1 answer

Remove some of the X axis labels in ggplot bar chart

I have the following code for a stacked bar graph for the period 1970-2020, which is the X-axis label. The graph is generated from a dataframe with 3 columns and 51 rows representing various years. Year Active New 1970 1 …
Hong
  • 73
  • 8
0
votes
0 answers

Changing legend items position

I have made a graph in R using gggplot, and it looks like this: My problem is that I would like to move the legend items so that "highly agree" appears to the left and "highly disagree" to the right, so that it fits better with the order in the…
Norasy
  • 13
  • 3
0
votes
1 answer

Create a 100% stacked bar chart

I have the following table: +-------------+--------+-----+ | fields| Status|count| +-------------+--------+-----+ | LastName|complete|27399| | Race| missing| 146| | Email| missing|24225| | …
budding pro
  • 135
  • 1
  • 2
  • 10