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

Changing the fill colour in a stacked barchart in ggplot2

I have a very simple question. I need to add a legend and change the colour of the bars in a stacked barchart. I managed to split my barchart into three different colour groups according to the year my data come from, but the colours are…
Devon
  • 17
  • 3
0
votes
0 answers

Tremor barchart onclick React ts

I want to be able to click on one of the bars to open a new window, but it seems like the tremor library doesn't have the functionality to have some kind of onclick. Could someone help me with that? my barchart code I have tried changing it from a…
0
votes
0 answers

manually change color in ggplot2

I wanted to create a stacked bar chart with the colors I've indicated in the color_vector. But it's still printing out the default colors associated with ggplot2. #create a stacked barchart of proportion color_vector <- c("lightcoral", "lightblue1",…
0
votes
1 answer

How can I convert this stacked barplot to a circular plot in R?

I want to convert this stacked barplot to a circular plot in R. but the script here is just for grouped bar plots (as you can see at the center of the circle: A,B,C,D). How can I convert this stacked barplot to a circular plot? Here is my data: …
zahra abdi
  • 307
  • 2
  • 7
0
votes
0 answers

Seeking explaination of why my stacked bar chart bars does not stack but overlap instead?

Using MatPlotLib in Python, i have tried this: labels = range(len(df["Investigations"])) #column vector of strings - hid for the example's sake normals = df["No signs of pathology"] #column vector of integers abnormals = df["Abnormal"] #column…
Vuptiman
  • 1
  • 2
0
votes
0 answers

Want to Generate this type of Graph in Flutter

I want to generate one this kind of graph in Flutter, I have provide the graph video link. If you know please provide me the solution, Please watch the video also and I have provided the datapoints also. History Graph Link History Graph…
0
votes
1 answer

Formatting data for building stacked bars in recharts React

My problem is to the best way to format the received data to build a custom recharts stacked barchart. I need to format the data by group_by field and for each Xaxis key (usage_date field) showing the data in such way as on the image: Tried a lot…
user16473744
0
votes
0 answers

Grouped Stacked Bar Chart with D3 JS

I have created two different stacked charts. I want to combine them so that they can be visualized in a single chart. The data I have looks like: I divided the data into two parts, one containing the male data and the other containing female data…
0
votes
0 answers

How to have pattern and color in chart for the negative values?

This is the chart As it shows it loses its color and only gets the pattern. here is my data: stack_bar_chart=[{primary_reason: "WAC Adjustment", mean_new_percent_change: 129.17999999999998, year: "2017"} ,{primary_reason: "Survey Rate",…
0
votes
1 answer

Change labels of name and value columns using pivot longer

Hello I am new to R and I am trying to make a stacking bar plot with each bar corresponding to a different year using ggplot. Year will be the x axis while Frequency is on the y axis. I can make the stacked bar plot just with "values" and "name".…
Megan D
  • 25
  • 4
0
votes
1 answer

Percent stacked barchart: from Excel to ggplot2 in R

My question is pretty simple. I'm trying to create a percent stacked barchart in ggplot2. I know exactly how I want it to be like because I created the same chart in Excel already, but I don't know how to obtain the same graph in R. My issue is that…
Devon
  • 17
  • 3
0
votes
0 answers

R function for labeling the beginning and the end of a stacked bar

I am trying to make a stacked bar with the beginning and ending labels for each stacked element. my code is this: ggplot(chr2007816root, aes(fill=factor(Feature,levels = c("tnt1","ex6", "int5", "ex5", "int4", "ex4", "int3", "ex3",…
0
votes
1 answer

set x axis as column names on barplot

I have a dataframe such as this: data = {'name': ['Bob', 'Chuck', 'Daren', 'Elisa'], '100m': [19, 14, 12, 11], '200m': [36, 25, 24, 24], '400m': [67, 64, 58, 57], '800m': [117, 120, 123, 121]} df =…
You_Donut
  • 155
  • 8
0
votes
0 answers

Button option in plotly python to switch graph display between two different data sets

I'm trying to introduce buttons in plotyly express to switch between datasets and display the same in as stacked graph with color options. fig.update_layout( autosize=True, title=title, title_x=0.5, …
0
votes
1 answer

Bar Chart with Wide Format Data Fails With Data of Type datetime.time or datetime.timedelta

I am trying to create a stacked bar chart of values of type datetime.time (alternatively datetime.timedelta) using plotly, but with no success. I follow the example "Bar charts with Wide Format Data " given in the documentation. I just convert the…