Questions tagged [bar-chart]
A bar chart is graphical representation of data where the value is represented by the length of the bar.
7,802
questions
0
votes
0
answers
7
views
How can I see barchart value above bar?
By using MPAndroidChart, I draw barchart but I can't see the value of bar.
I changed some values but it does't work.
I set setDrawValueAboveBar(true), setDrawValues(true), valueFormatter, ...
0
votes
1
answer
33
views
How to get element on click in Chart Js?
I'm adding Chart Js in my react app to display data as bar chart. The code works and I can display data correctly, the only issue I'm facing is that if one of the data values is too high, bar chart ...
0
votes
0
answers
9
views
How to create a bar chart with a specific time frame on x, % of efficiency on y and columns width depending on duration?
I am studying the utilization of machines and would like to make a special bar chart.
My data set I created is made like this"
Program Name, Start Timestamp, Finish Timestamp, % of efficiency
I ...
0
votes
0
answers
19
views
How can I start Chartjs bars from left side instead of center?
I created a bar chart using ChartJS. The problem is when a data point is small like 2 length. It align all bars in center.
But I don't want this.
The canvas width is 100% to its wrapper. Bars ...
0
votes
0
answers
9
views
Make bar graph with plotly using Rstudio
Is there someone who can help me to make graph of the example of data using plotly or ggplot2 with rstudio?
data to use
I want that the graph looks like output need
0
votes
1
answer
25
views
Python matplotlib.pyplot from SQL query
I am new to SQL and I want to create a bar chart based on my SQL query. I am using the SAKILA database. I got the following query and output:
Sakila database: https://dev.mysql.com/doc/sakila/en/...
-1
votes
1
answer
27
views
How to construct a function that will construct a histogram or a bar chart depending the variable
How can I construct a function (in base R)which will receive as an input parameter a variable, and will construct a histogram or a bar chart depending on whether it will be a quantitative or ...
0
votes
0
answers
26
views
Adding percent labels to a stacked barplot in R
I currently have a stacked barplot with the data how I want it, other than the fact I am unsure of how to add percentage labels to break down how much of each sample belongs to each color/category.
I ...
0
votes
0
answers
20
views
Seaborn Barplot With Multiple Years and Weeks [duplicate]
i want to plot some data:
Year
Week
Value
2022
1
40
2022
2
45
2022
3
30
...
...
...
2023
1
55
2023
2
57
And i want it to look something like this:enter image description here
I don't want to ...
0
votes
0
answers
20
views
Plotly bar plot overlay colors getting mixed
I have a bar plot (python plotly) with two traces in blue and yellow (as shown by the legend), using the barmode='overlay' layout setting. But however when displaying the figure, these two colors get '...
1
vote
1
answer
69
views
Combine Binned barplot with lineplot
I'd like to represent two datasets on the same plot, one as a line as one as a binned barplot. I can do each individually:
tobar = pd.melt(pd.DataFrame(np.random.randn(1000).cumsum()))
tobar["...
0
votes
1
answer
28
views
how to hide the value on top of barchart when its zero? [closed]
I am using fl chart pakage for bar graph.
0
votes
1
answer
14
views
Making a line graph with certain X + Y values expressed differently with lines of 33 user IDs in R
I'm trying to put ActivityDate on the X Axis, and Calories on the Y Axis, relating to how 33 different users ranged in their calorie burnings daily. I'm new to ggplot and visualizations as you can ...
0
votes
0
answers
10
views
how can customize my bar plot fill in black and white stripes
i run the scale_fill_pattern() function to make changes to my bar plot fill, but i keeps sending me an error.
# this is the code execution and the error it produced. NOTE: i have installed "...
0
votes
1
answer
25
views
Creating 4 yes/no bar charts on a single plot from frequency tables in R
I have four variables as columns in my data set:
whether the person had free school meals when they were younger
whether the person's parents attended university
whether the person studied A-level ...
0
votes
1
answer
38
views
Draw bars in bar chart next to each other instead of vertically stacked
I've been stuck for a week with a R script
I'm trying to make a graph and I can't get separate bars for my data they are superimposed on each other
I have an excel file containing 3 columns,
column1: ...
0
votes
2
answers
105
views
ggplot: how to draw a plot with colored columns?
Hy guys, I'm need to replicate this kind of plot Real Wages differences for each city
In the x axis there is the code of each city, while in the y axis the values of the real wage.
Actually, I have 2 ...
0
votes
2
answers
80
views
How do I add bar labels in each catplot facet with horizontal bars?
I had Facet Grids and managed to make them horizontal, however after that I have searched for an appropriate code to display the percentages as before but what I found just isn't working as expected.
...
0
votes
1
answer
29
views
How do I Bind geom_line to Grouped geom_bar
I am stuck implementing the idea to combine the barplot containing fact, target and prognosis values with a line representing a fitted model based on fact and leading to prognosis values.
I am trying ...
0
votes
0
answers
7
views
Plotly does not color-code my chart according to the variable indicated
I have the problem that when I concatenate two csv and create a column "Version" with string values, plotly does NOT generate the classification of each of the values, in this case 1 and 2. ...
0
votes
0
answers
21
views
Why do my bar charts disappear when I set the y-axis to a custom level in R? [duplicate]
I have a simple table:
# A tibble: 6 × 2
weekday total_cal
<chr> <dbl>
1 Friday 2220.
2 Monday 2104.
3 Saturday 2205.
4 Sunday 2070.
5 Thursday 1930.
...
0
votes
1
answer
40
views
Adding weights to barplot function in ggplot2
I am working with survey data with 250 columns. A sample of my data looks like this:
q1 <- factor(c("yes",NA,"no","yes",NA,"yes","no","yes&...
0
votes
1
answer
21
views
Need to show date in primeng bar chart
I'm using primeng along with Angular to show bar chart/graph. In the below code, I want to display date like (27-feb-23) on X axies. I guess, I need to add some labelformat in ticks, though I'm not ...
0
votes
2
answers
54
views
Bar chart from many variables where varx = in Stata
I have a bar chart question here. Given that for all the variables in the dataset 1 = yes and 0 = No. I would like to plot a bar graph with the percentages (where var=1) on the y-axis and the ...
0
votes
1
answer
17
views
I want to make vertical bars with values on top of each bar
the plot is horizontal without values I tried this code
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
g = sns.barplot(
x="score",
y="...
0
votes
0
answers
25
views
How to reorder barchart last two bars (ggplot)
I have this graph and I want to keep the descending order but fix the var Q7_1_66 and Q7_1_99 at the bottom.
I have no ideia how. Some advice?
1
vote
1
answer
21
views
How to add ascending - descending sort buttons in a bar chart using d3.js?
I'm trying to figure out how to add interactive features in a bar chart.
Now I'm stuck about program fuctions for a click action using a button to sort ascending and descending.
This is my code:
const ...
0
votes
1
answer
27
views
In a barplot in R, is there a way to choose which labels will be shown in X axis?
I have data to be shown on a barplot, with groups varying between 1 and 50.
However, not all labels appear on X axis. I really don't want all of it, but from 5 to 5.
Can I choose this? R is naming ...
0
votes
0
answers
23
views
Display multple charts with asp.net mvc chart control
I am trying to create 2 charts with Asp.Net MVC chart control on a cshtml razor page. First chart works fine always but second chart will not display. What may be the issue with Chart initialization.
...
1
vote
1
answer
34
views
Time series bar chart with dictionary dataframes - Matplotlib
I am trying to create a timeseries chart where I have dataframes that are nested. Originally my data was on the format:
PartId Event
100 [{EventId: 1, EventTime: "2022-06-19T10:50:14.513&...
0
votes
0
answers
26
views
How to split x-axis label names in a base R barplot from a dataframe exported from excel
I have an excel document which looks like the one below:
When I created a barplot using the base R barplot function the x-axis labels did not fit in one line since the labels were long.
example <- ...
0
votes
1
answer
24
views
How to plot labels in alphabetical orders with coulour-gradient in python?
I want to plot labels "nutrition_grade_fr" in alphabetical orders with coulour-gradient in python.
Here is the code for my graph but it does not show the labels in alphabetical order nor ...
0
votes
1
answer
19
views
Adding more bars to plot
I have an excel file looking like this:
| Dept. | Q1 Budget | Q1 Actual | Q2 Budget | Q2 Actual | Q3 Budget | Q3 Actual | Q4 Budget | Q4 Actual |
|---------------------|-----------|------...
1
vote
3
answers
37
views
How to change Grouped Barplot (multiple Barplot) labels?
I have a multiple bar plot with 5 bar plots.
barplot1=c(8,3,4,1)
barplot2=c(18,11,11,13)
barplot3=c(39,42,42,45)
barplot4=c(26,30,31,34)
barplot5=c(9,13,12,7)
data <- data.frame(barplot1,barplot2,...
1
vote
2
answers
49
views
R- Bar plot with continuous x and y
If this question has already been answered, please link as I have not been able to locate a similar question. I have referred to R bar plot with 3 variables, Bar plot with multiple variables in R, ...
0
votes
1
answer
27
views
Removing NA category from grouped bar charts
I am currently working with survey data with 250 columns. A sample of my data looks like this:
q1 <- factor(c("yes",NA,"no","yes",NA,"yes","no",&...
1
vote
1
answer
39
views
Create Altair Chart of Value Counts of Multiple Columns
Using Altair charting, how can I create a chart of value_counts() of multiple columns? This is easily done by matplotlib. How can the identical chart be created using Altair?
import matplotlib.pyplot ...
0
votes
0
answers
13
views
Tableau : Click in the field of bar-graph changing Date parameter
I have a pretty simple use case.
I have the Bar-Graph where one of the X-axis is Date Field grouped together on data to form the image attached below .
So , I want that whenever , I change click on ...
1
vote
0
answers
32
views
Nivo responsive bar chart x-axis overflow with minValue and maxValue
I am having an issue with the Nivo responsive bar chart. I have set the "minValue" and the "maxValue" in my chart props per the documentation. The data passed to the chart contains ...
0
votes
0
answers
30
views
Stacked Barplot with 3 categories in Plolty
Hi I need a help in creating a Barplot in plotly, any help and suggestion will be much appreciated.
I have a dataframe with columns 'partner', 'weekday', 'time_of_day', 'country', and 'count'. I want ...
2
votes
2
answers
44
views
Chart.js Custom parsing with floating bar chart
I have a floating bar chart that somewhat represents a Gantt chart:
The dataset looks as follows:
{
"labels": [
"Uwe Austermühle",
"Helmar Conradi",
...
0
votes
0
answers
25
views
Plotly annotations show 'NaN' when passing text
I want to create a graph with 2 charts:
the first one shows the bank lending volumes by industry in Ukraine,
the second one should show the market share of the biggest lender.
The underlying data ...
0
votes
1
answer
28
views
Reordering rows in a bar chart using geom_col
I have the following simple code for generating a bar chart using the geom_col command in ggplot2:
plt <- ggplot(data) +
geom_col(aes(Participations,Country), fill = BLUE, width = 0.6)
My ...
0
votes
1
answer
38
views
Adding total count of observations to barplot
I am currently working with survey data with 250 columns. A sample of my data looks like this:
q1 <- factor(c("yes","yes","no","yes",NA,"yes","...
0
votes
1
answer
18
views
I would like to create a bar chart like this using flutter, which package can I use?
I tried StackedColumn100Series but I couldn't customize it the way I want.
1
vote
1
answer
33
views
switch color of one given bar in a bar plot of a pandas dataframe in python
I have the following barh plot of a given dataframe:
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
df = pd.DataFrame({"first":np.arange(1,6), "second":np....
0
votes
0
answers
19
views
Error Bars for bar graph (grouped) using ggplot2
I am trying to add error bars to my bar graph and I cannot seem to get the code to work. Can anyone see what I am missing? I keep getting an output with no error bars, but I don't see any errors ...
0
votes
1
answer
39
views
Order Ggplot bars by group
hello everyone I hope everything is fine.
I'm trying to order my ggplot bars by group but it won't work. I've tried several things as described in the post bellow but I'm still not able to see the ...
0
votes
1
answer
32
views
getting counts insides stack bar chart in python
I m trying to show the number of counts in each color bar . is there a way to do that ?
here is the code:
import pandas as pd
# sample data
data = {'fields': ['LastName', 'Race', 'Email', 'MidName', ...
0
votes
0
answers
34
views
How to Use Chart.js or recharts in react-pdf/renderer
I want to create pdf using react-pdf ,but for charts/graphs i have to use Chart.js or recharts ,but directly i can not implement into react-pdf , another option i have seen from a qs:
How to add ...