bar-chart

How to have a a single series data label on a grouped bar chart?

笑着哭i 提交于 2019-12-11 11:07:58
问题 I have an SSRS bar chart the shows some data in a handful of category groups. It's pretty straightforward and looks like this: I've now got the need to segment each category into two series groups like so: So far so good however I need to display the ungrouped percentage data labels (i.e. the requirement is to continue to show the percentage of each combined category group, NOT the percentage of the series group). So I need the bar chart from the second image but the data labels from the

R: Create barplot from aggregated data.frame

五迷三道 提交于 2019-12-11 10:50:33
问题 I have a result of "aggregate" like this: week year Severity 1 10 2013 26 2 11 2013 5 3 16 2013 26 I would like to draw a barplot with (as maximum) 52 bars (one for every week) with stacked bars of "severity" height for every year. I see from "barplot" documentation that I need a matrix for that. Of course I could use for/while and smth like that to get what I need, but I wonder if there's not a more "R-ish" way to solve this (seemingly pretty typical task) ? So, in more technical terms, I

JSON File to View in MVC Bar Chart - C#

浪尽此生 提交于 2019-12-11 10:39:16
问题 I am now able to deserialize a School from JSON, next step is to now insert the data into a Bar Chart using MVC. The JSON object looks like: [{"Subject": "TEST APP","AppScores": [{"Season": "AAAAAAAAAAAAAAAAAAAA","year": "1"}, {"Season": "BBBBBBBBBBBBBBBBBBBBB","year": "2"}]}, {"Subject": "TEST APP2","AppScores": [{"Season": "CCCCCCCCCCC","year": "3"}, {"Season": "DDDDDDDDDDDDDDDDD","year": "4"}]}] I have found out how to call the JSON file and view in the Console.WriteLine . var root = new

How to show bar values on CorePlot -Stacked bar chart

梦想与她 提交于 2019-12-11 10:22:17
问题 I have used core-plot to display stacked bar chart in my application, I followed this nice tutorial to implement the stacked bar chart, now the graph looks like below. "http://www.gilthonwe.com/2012/06/09/stacked-bar-chart-coreplot-ios/" I used the below code to display the bar values while user touches them on the screen. -(void)barPlot:(CPTBarPlot *)plot barWasSelectedAtRecordIndex:(NSUInteger)index { if (plot.isHidden == YES) { return; } static CPTMutableTextStyle *style = nil; if (!style)

Google Chart BarChart onmouseover

旧时模样 提交于 2019-12-11 10:19:18
问题 I am trying to add an listener on a "onmouseover" event on a Google BarChart, but cannot get it to work. I want to use the "mouseover"-element to make a ajax call...(a snippet of my code): dataTable = google.visualization.arrayToDataTable(dataRaw, false); var chart = new google.visualization.BarChart(document.getElementById("successChart")); //Setting options for the chart var options = {}....; chart.draw(dataTable, options); // Add actionlistener google.visualization.events.addListener(chart

Set colors in stacked bar plot per label

巧了我就是萌 提交于 2019-12-11 10:03:29
问题 I want to set the same colors pop up each time I run this barplot. For example: B1 = green, B2, red, B3 = blue etc. I have so far tried .setcolor but it does not provide me to set the colors for individual box numbers (B1, B2 etc) -- I could not figure it out. import pandas as pd import seaborn as sns d = {'DAY': [55,56,58,65], 'B1': [2,6,6,1], 'B2': [1,0,21,0], 'B3': [0,1,0,1]} data1= pd.DataFrame(data = d) sns.set() data1.set_index('DAY').plot(kind='bar', stacked=True) This works, but it

Error in extracting values from bar chart?

烈酒焚心 提交于 2019-12-11 09:26:57
问题 d=[1 2 3 4;5 6 7 8;9 10 11 12;13 14 15 16] bar_widh=0.2; figure; h = bar(d,bar_widh); for i=1:2:4 for j=1:4 x=d(i,j) y=d(i+1,j) figure,plot(x,y); end i=i+1; end In this code I had plotted a bar chart and I want to extract values from bar chart. (Values are correctly extracted but only one point is plotted; not a line) But i'm getting wrong results. My aim is to plot a line between d(1,1) and d(2,1);d(3,1) and d(4,1); d(1,2) and d(2,2);d(3,2) and d(4,2); d(1,3) and d(2,3);d(3,3) and d(4,3); d

MPChart library is hiding X-Axis labels including bars

被刻印的时光 ゝ 提交于 2019-12-11 09:01:35
问题 Here, I'm trying to show multiple bars in a chart using MPChart library. All values are dynamic and getting set fine. But some x-axis labels are always getting hidden whether length is 24 or 7 or 30. I tried to make it scrollable using : if (dayDataList != null && dayDataList.size() > 0) { chart.getXAxis().setAxisMaximum(dayDataList.size()); } else if (weekDataList != null && weekDataList.size() > 0) { chart.getXAxis().setAxisMaximum(weekDataList.size()); } else if (monthDataList != null &&

draw horizontal lines for bars in nvd3 multi bar chart

让人想犯罪 __ 提交于 2019-12-11 08:53:17
问题 I want to draw 2 horizontal lines for each of the bars in this nvd3 multibar chart Here is the fiddle I have few queries Why is yValueScale(0) not starting from 0 of the plot How do I start drawing the lines from where the bar starts? The xValueScale("A") does not start from the start of the bar of A How do I get to know the width of the bar to draw the line of length equal to the bar width 回答1: You are appending the line to the wrong "container". The svg variable is the entire svg container,

Clustered and stacked bar plot with multiple csv files

假如想象 提交于 2019-12-11 08:45:20
问题 I have multiple csv files with same structure of data url, A,B,C,D a.com,1,2,3,4 b.com,3,4,5,6 I can create a stacked bar plot with urls on x-axis and A,B,C,D stacked on top of each other. Now I want to create clustered stacked bar plots, with multiple such csv files, all indexed by the same url on the x axis. data1 = read.csv("data.csv") data2 = read.csv("data2.csv") data.m = melt(data1, id.var="url") ggplot(data.m, aes(x = url, y = value, fill = variable)) + geom_bar(position="fill",stat =