bar-chart

How to get label for corresponding swipe in barchart of mpandroidchart?

馋奶兔 提交于 2019-12-13 08:28:27
问题 How to get label for corresponding bar when I swipe the barchart? I have another textview outside of barchart. When I swipe mpandroidchart graph, I need to get x axis label of corresponding position and display in textview. How to do that? I tried with this. barChart.setOnChartValueSelectedListener(new OnChartValueSelectedListener() { @Override public void onValueSelected(Entry e, int dataSetIndex, Highlight h) { Log.i("Entry", String.valueOf(e)); } @Override public void onNothingSelected() {

lattice: Clustered Barchart: Sort bars and display values at top of bars

橙三吉。 提交于 2019-12-13 07:32:33
问题 I am working on a child sexual abuse research. For this, I want to prepare a clustered bar chart using lattice . I used the following code. My data: nature <- read.table(text = "Nature_of_sexual_abuse, Familiarity_with_the_perpetrator, Count Talked in a sexual way, Not familiar at all, 21 Talked in a sexual way, Not very familiar, 22 Talked in a sexual way, Very familiar, 22 Shown pornography, Not familiar at all, 6 Shown pornography, Not very familiar, 17 Shown pornography, Very familiar, 16

gannt chart formed by google bar chart: different color to each bar

社会主义新天地 提交于 2019-12-13 07:06:03
问题 I have the following sort of gantt chart coded up using Google Charts, but I would like to assign different color to each bar. Now in my case since I am assigning a transparent color to spacer , I dont understand how I can assign a different color to each remaining bar. This probably comes down to assigning the same series in different bars different colors. Can someone help me out with fixing this? http://jsfiddle.net/bootkick/hp2yr/ google.load('visualization', '1', { packages: ['corechart'

AmCharts: Clustered bar chart with sub-categories

末鹿安然 提交于 2019-12-13 06:36:35
问题 I try to realize a clustered bar chart with sub-categories in amcharts (two levels in my x-axis). I couldn't find a way to do it. Does anyone know how to do it ? An example of my data and the graph I need is available in the following link : https://www.european-datalab.com/data-clustered-bar-chart/ 回答1: The tricky part is the parent category name_fr on the graph. To do that, we need to use Guide (https://docs.amcharts.com/3/javascriptcharts/Guide) within the CategoryAxis . But in order to

Add text on top of bar in d3js chart — no <text> elements added

丶灬走出姿态 提交于 2019-12-13 04:34:33
问题 I am creating a bar chart with d3.js from data stored in tsv file. I want to insert a text in each bar. How I can do? I have tried even this solution, but doesn't work. Here is the code of my function: var margin = {top: 20, right: 20, bottom: 30, left: 40}, width = 960 - margin.left - margin.right, height = 500 - margin.top - margin.bottom; var formatPercent = d3.format(".0%"); var x = d3.scale.ordinal() .rangeRoundBands([0, width], .1, 1); var y = d3.scale.linear() .range([height, 0]); var

How to put significance level (p-value) on barplot in ggplot2 automatically?

徘徊边缘 提交于 2019-12-13 04:18:19
问题 I saw a similar answer already asked here, but the mine is little bit different. Is there a way to calculate significance and put the stars on the barplot, automatically in ggplot? I have a plot with barplot that represent the mean of an entire season, for some variables (compounds), and other three layers with point, line and errorbars of the average of specific time windows (phenological stages) into the complete season. I want just to put asterisks over barplots of the total season average

How to make groups of horizontal bars have the same color?

北战南征 提交于 2019-12-13 03:32:39
问题 I need to plot horizontal bars using the grouped style such that all the bars belonging to each group have the same color but different from other groups (i.e. all bars of the top group are red, the group below it - green, and so on...). Also, how can I put the values on the top of each bar horizontally? How can I control the position of such values? This is my code: y = [91.9 8.1 94.4 5.6; 84.9 15.1 90.12 9.88; 89.4 10.6 91.2 8.8; 72 28 50.9 49.1]; h = barh(y,'grouped'); job = {'group1',

Excel 2007 Change colour of bars in a single series, based on another field

和自甴很熟 提交于 2019-12-13 02:48:00
问题 I have a pivot table with data like this: Chain Store Units Bob's BB Los Angeles 10 Bob's BB San Diego 12 Tom's TM Los Angeles 12 Tom's TM San Francisco 18 Kate's K Monterey 11 Currently I have a bar chart just showing all stores and units in descending order, so TM San Francisco is first, then TM Los Angeles and BB San Diego, then K Monterey etc. This is how I want to see the data. But I also want to colour code the chains, so Bob's stores have a red bar, Tom's have blue, and Kate's are

JQPlot - Stacked Horizontal Bar Chart - No Bars When Stacked

女生的网名这么多〃 提交于 2019-12-13 02:34:54
问题 Having a strange issue with jqplot. I've created a horizontal bar chart with 2 series and 5 labels; all populated with variables from a table. var plot1 = $.jqplot('chart1', [ [[SERIESA[0],TITLE[0]], [SERIESA[1],TITLE[1]], [SERIESA[2],TITLE[2]], [SERIESA[3],TITLE[3]], [SERIESA[4],TITLE[4]]], [[SERIESB[0],TITLE[0]], [SERIESB[1],TITLE[1]], [SERIESB[2],TITLE[2]], [SERIESB[3],TITLE[3]], [SERIESB[4],TITLE[4]]]], { seriesDefaults: { renderer:$.jqplot.BarRenderer, // Show point labels to the right (

Python: Bar chart - plot sum of values by a) year and b) quarter across all years

梦想与她 提交于 2019-12-12 23:44:51
问题 I have time series data, i.e. by date (YYYY-MM-DD), returns, pnl, # of trades: date returns pnl no_trades 1998-01-01 0.01 0.05 5 1998-01-02 -0.04 0.12 2 ... 2010-12-31 0.05 0.25 3 Now I would like to show horizontal bar charts with a) the average of the returns b) sum of the pnls by: 1) year, i.e. 1998, 1999, ..., 2010 2) quarter across all years, i.e. Q1 (YYYY-01-01 to YYYY-03-31), Q2, .., Q4 Additionally, the sum of # of trades per 1) and 2) should denote a number next to each of the