charts

Histogram with values from csv

不问归期 提交于 2019-12-24 08:48:06
问题 I am trying to create a simple histogram with values stored in a csv (that I will be modifying through the time). The code I am using now is: (edited code!) var values = [] d3.csv('../static/CSV/Chart_data/histogram_sub.csv?rnd='+(new Date).getTime(),function(data){ values = Object.keys(data).map(function(k){ return data[k]['Calculus I']}); var color = "steelblue"; // Generate a 1000 data points using normal distribution with mean=20, deviation=5 // A formatter for counts. var formatCount =

Changing color of Bars in a bar chart

余生颓废 提交于 2019-12-24 08:38:38
问题 I have a code in excel to change colors of bar graph but its not working. Can anyone suggest me what I am doing wrong in the code. With ActiveChart.SeriesCollection(1).Interior.Color = RGB(0, 153, 64) End With This code doesnt affect color of the bar. Also, For all bars (representing values 0 to 200) I want one color (green) but for two bars representing two data points (100 and 200), I want to add different color. Can anyone please tell me how to to that with VBA. I would appreciate your

google charts not showing when called through jquery ajax

▼魔方 西西 提交于 2019-12-24 08:26:00
问题 I am trying to use google chart to show the chart.My json data is coming when I am checking through the alert option to check the data are pushed into list but overall the chart is not able to display. <html> <head> <!--Load the AJAX API--> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.js"></script> <script type="text/javascript"> // Load the Visualization API and the piechart

Why is the clicked() signal for the QPieSlice not emitted?

我是研究僧i 提交于 2019-12-24 08:18:35
问题 I'm using Qt charts module to draw a Nested Donuts chart just like the example in Qt Charts. And I want every components (QPieSlice) response to the mouse event, the hovered() signals work well, however, the clicked() signals only work for the QpieSlices in the last added QPieSerie. It seems other QpieSlices do not emit the signals, since if I explicitly call the clicked() function, the slot response correctly. This piece of code shows the issue Widget::Widget(QWidget *parent): QWidget(parent

Google Charts Data Grouping for column chart

旧街凉风 提交于 2019-12-24 07:59:42
问题 I am trying to achieve this kind of chart (column chart) but I can't seem to group my data correctly, Please help. Here's my sample json data. [ [ 'male', '05-09' ], [ 'female', '05-09' ], [ 'male', '05-09' ], ] and I am creating my datatable using function createDataTable(rawData, $tableHeader) { try { return google.visualization.arrayToDataTable([ $tableHeader, ...rawData ]); } catch (e) { return null; } } Then here's how I am grouping it currently function groupData(columnIndex) { return

Getting percentages in legend from pie matplotlib pie chart?

不打扰是莪最后的温柔 提交于 2019-12-24 07:49:25
问题 I have created a pie chart using matplotlib below: labels = ['dogs','cats','birds','fish'] sizes = [34, 24,18,13] pie = plt.pie(sizes,autopct='%1.1f%%', startangle=90) plt.axis('equal') plt.legend( loc = 'right', labels=labels) plt.show() (sorry I do not know how to show the pie chart on here) Instead of having the percentages on the pie slices, is there a way to put these percentages within the legend so that the legend reads: dogs, 34% cats, 24% birds, 18% fish, 13% I know I can just change

Getting percentages in legend from pie matplotlib pie chart?

做~自己de王妃 提交于 2019-12-24 07:48:25
问题 I have created a pie chart using matplotlib below: labels = ['dogs','cats','birds','fish'] sizes = [34, 24,18,13] pie = plt.pie(sizes,autopct='%1.1f%%', startangle=90) plt.axis('equal') plt.legend( loc = 'right', labels=labels) plt.show() (sorry I do not know how to show the pie chart on here) Instead of having the percentages on the pie slices, is there a way to put these percentages within the legend so that the legend reads: dogs, 34% cats, 24% birds, 18% fish, 13% I know I can just change

How to add a vertical line in a horizontal bar chart using primefaces + jqplot

好久不见. 提交于 2019-12-24 07:48:15
问题 I'm using primefaces + jqplot to create a Horizontal and Stacked bar chart: Code ( Example - Primefaces ): http://www.primefaces.org/showcase/ui/chart/bar.xhtml I need to add a line in chart like this image: ( Red line in Vertical ) http://peltiertech.com/Excel/pix1/AddLine.gif Can i do this with Primefaces + Jqplot ? If it's possible, someone can help me to understand ? 回答1: Finally solved my problem: 1 - Add a extender in Managed Bean with name of extender: horizontalBarModel.setExtender(

D3Js Bar Chart Bars Starting Way After beginning of X-Axis

我们两清 提交于 2019-12-24 07:41:07
问题 As the title say, I am creating a bar chart using D3Js. What do I have to change in the following snippet for the bars to start at the beginning of the X-Axis? var allBarsDatasets = [ { "xAxisTickValue": "10-1", "barValue": 18 }, { "xAxisTickValue": "10-2", "barValue": 17 }, { "xAxisTickValue": "10-3", "barValue": 17 }, { "xAxisTickValue": "10-4", "barValue": 19 }, { "xAxisTickValue": "11-1", "barValue": 19 }, { "xAxisTickValue": "11-2", "barValue": 14 }, { "xAxisTickValue": "11-3", "barValue

PHPExcel removes chart style when template is loaded

南笙酒味 提交于 2019-12-24 07:29:35
问题 I am using PHPExcel to read and write values to Excel. I have a template that has a graph and a style on it. Here's the issue: After I appended some value on the Excel sheet, the style of the chart has been remove and it shows the default style. I am using this code to read: $objReader = PHPExcel_IOFactory::createReader('Excel2007'); // Tell the reader to include charts when it loads a file $objReader->setIncludeCharts(TRUE); // Load the file $objPHPExcel = $objReader->load("rcca.xlsx"); And