bar-chart

How to adjust Horizontal Bar chart in layout?

无人久伴 提交于 2019-12-11 16:52:58
问题 In this layout, I use Horizontal chart and ratingBar widget.I want every bar to be in front of its own ratingBar. I change barWidth of chart but I couldn't adjust my layout. This is my xml layout: <LinearLayout android:id="@+id/layoutRating" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_marginTop="20dp" android:layout_below="@+id/txtLabelRate" android:visibility="visible"> <com.github.mikephil.charting.charts

Using R to make a barplot with a specific width?

荒凉一梦 提交于 2019-12-11 16:27:35
问题 I would like to use R to make a barplot of ~100,000 numerical entries. The plot will be dense, which is what I want. So far I am using the following code: sample_var <- c(2,5,3,2,3,2,6,10,20,...) #Filled with 100,000 entries barplot(sample_var) The resulting plot is just what I want, but it is a square, whereas I want a long rectangle. Is there a way to set the dimensions of the barplot? I would like to specific an aspect ratio of 10:1 for length x height, or a specific pixel setting of

How to solve Chart js mismatched x-axes label and value dynamically in Laravel?

回眸只為那壹抹淺笑 提交于 2019-12-11 16:12:55
问题 I have encountered a problem using chart js when applying it dynamiccally, which means I get a data from my database and output a bar graph using Chart JS. I found this example which works when a value is 0, but on my situation some data on a specific year cannot be found yet on my database, which leads to a null value. How can I set this empty or null value to zero so that I can achieve this example https://jsfiddle.net/17mw40rx/1/. I want also to show my JS code which I copied from the same

BarChart bar value labels are hidden by the margin

余生长醉 提交于 2019-12-11 14:19:18
问题 I am using Jaspersoft Studio to create the report file with charts. When I use the bar chart and try to display the bar values labels these are covered by the margins. In my opinion this looks like a bug, is there any way to show the labels properly? To better illustrate the problem you can see the issue on the picture and also find in red the expected values. EDIT Here is my progress customizing the bar chat. So far I could make several changes but I am stuck with the most important one. I

How to merge column labels in barplot in R (a stacked barplot)?

做~自己de王妃 提交于 2019-12-11 12:41:41
问题 my data in R is look like this: 1-12 1-12 1-15 1-15 1-20 1-20 2-6 2-6 3-1-1 3-1-1 3-1 3-1 3-2 3-2 3-3 3-3 N 0 0 14 0 17 0 9 0 27 0 9 0 13 0 33 0 P 0 0 0 12 0 12 0 5 0 13 0 6 0 0 0 9 F 0 0 0 0 0 0 0 2 0 14 0 0 0 6 0 20 By dput(data) the result in R is: structure(c(0L, 0L, 0L, 0L, 0L, 0L, 14L, 0L, 0L, 0L, 12L, 0L, 17L, 0L, 0L, 0L, 12L, 0L, 9L, 0L, 0L, 0L, 5L, 2L, 27L, 0L, 0L, 0L, 13L, 14L, 9L, 0L, 0L, 0L, 6L, 0L, 13L, 0L, 0L, 0L, 0L, 6L, 33L, 0L, 0L, 0L, 9L, 20L), .Dim = c(3L, 16L), .Dimnames =

D3 make stacked bar chart dynamic

落花浮王杯 提交于 2019-12-11 12:35:26
问题 I am trying to follow this example: http://bl.ocks.org/mbostock/3886208 In my application I have to show a stacked bar chart where I can see for example how many different animals specific user bought. Here is my object: [["PersonName1", 10, 10],["PersonName2", 4, 16]]; First property is name, second is animal type 1, and third is animal type 2. I've got stuck in this foreach loop: data.forEach(function(d) { var y0 = 0; d.ages = color.domain().map(function(name) { return {name: name, y0: y0,

How can I update JavaFX BarChart in Swing application?

折月煮酒 提交于 2019-12-11 12:05:58
问题 I want to update a JavaFX BarChart. I initialize my BarChart with this method: private void initFxComponents(String questionName){ Platform.runLater(() -> { final CategoryAxis xAxis = new CategoryAxis(); final NumberAxis yAxis = new NumberAxis(); final BarChart<String, Number> barChart = new BarChart<>(xAxis,yAxis); barChart.setTitle(questionName); barChart.setLegendVisible(false); xAxis.setLabel("Answer"); yAxis.setLabel("Number of times answered"); series = new Series(); int

Y axis limit in Chart JS Bar chart?

a 夏天 提交于 2019-12-11 11:49:59
问题 What is the Y-axis limit of chart js Bar charts? I used 17 digit number and it displayed nothing in that chart. 回答1: There is no limit on the y-axis (except possibly the javascript limit on the number type) However, what you are possibly seeing might be a LOSS of precision above 9007199254740992 - which not so coincidentally is a 17 digit number (see What is JavaScript's highest integer value that a Number can go to without losing precision? and the associated problems Chart.js uses the value

2-layer barplot in R

£可爱£侵袭症+ 提交于 2019-12-11 11:13:58
问题 I am trying to build a (somewhat) complex barplot in R. The idea is to overlay two charts, whereby the bars in one are wider than in the other one, such that both bars are always visible. Here's what I have right now: # GENERATE THE DATA Age = c(50, 55, 60, 65, 70) # Age groups Male = c(15.4, 24.3, 37.0, 54.6, 71.1) # Death rates for males Female = c(8.4, 13.6, 19.3, 35.1, 50.0) # Death rates for females Deathrate = matrix(c(Male,Female), nrow=length(Age), ncol=2, dimnames=list(Age, c("Male",

Draw a line above bar chart

守給你的承諾、 提交于 2019-12-11 11:08:01
问题 In the old static image Google charts I have been producing a combined chart like this one: It has 3 series (the bars drawn in dark green, light green and pink - on the top) and then it is overlayed by one more data serie - the blue line. My question is: if that is possible in the new Google charts? 回答1: Looks like Combo Chart still has documentation for columns, stacked columns and lines. 来源: https://stackoverflow.com/questions/10052927/draw-a-line-above-bar-chart