charts

How to make SQL Query to get the sum of specific column?

白昼怎懂夜的黑 提交于 2019-12-24 21:24:46
问题 Previously I draw a google chart (Pie Chart), using Ajax and the chart can be displayed as it only involved 2 columns. Now, I want to draw a column chart like this one. This is my SQL Query: $sql = "Select count(application_id) as count, application_status, category_group from mdl_local_jobs_application inner join mdl_local_jobs_job on mdl_local_jobs_application.application_jobid = mdl_local_jobs_job.job_id left join mdl_local_jobs_category on mdl_local_jobs_job.job_categoryid = mdl_local

Add a jfree bar chart into a scroll pane

烈酒焚心 提交于 2019-12-24 21:23:27
问题 I have a JFree Bar Chart. the dataset is populated using DefaultCategoryDataset , There may be situations when the values on both the domain and range axis are such that these values are not very clearly visible. I need something like a scrollPane into which the chart can be added. But it looks like the ChartPanel cannot be added into a JScrollPane Is there any way of doing this ? Thanks Bhavya 回答1: You can use setLowerMargin() and/or getUpperMargin() on the relevant CategoryAxis to improve

Show No data message when chart has no data

人走茶凉 提交于 2019-12-24 20:46:39
问题 I am trying to show no data message when chart has no data. Is it correct? var ctx = document.getElementById('mycanvas').getContext('2d'); var chart = new Chart(ctx, { type: 'doughnut', data: { labels: ["aa", "bb", "cc", "dd"], datasets: [{ label: "My First dataset", backgroundColor: ['red', 'blue', 'green', 'yello'], data: data.length ? data: [{ label: "No Data", value: 100 }], }] }, options: { legend: { position: 'right', labels: { boxWidth: 12 } }, tooltips: { bodyFontSize: 12 } } }); I am

Creating an Excel macro for multiple graphs with the same x-values but different y-values

跟風遠走 提交于 2019-12-24 19:36:06
问题 I'm trying to automate the creation of graphs in Excel by means of a macro. Basically I've got a lot of data (41 columns, starting from column C to column AQ) each one containing another 'name'. In one column there are two series in two different row sections (one from row 3 to 8, one from row 12 to 17). I want one graph per column, so in total I'll have 41 graphs. Each graph contains the two series. In column B are the values on the X axis, and this is for every graph the same. The purpose

C3.js fill area between curves

你。 提交于 2019-12-24 19:09:03
问题 i have chart like this I need to fill 3 area between dashed line. for example : fill area between 2 red dashed line, 2 blue dashed line and 2 green dashed line. I try do it like this: function fillArea(){ var d = {}; var x = []; var y1 = []; var y0 = []; for(var i = 0; i < chartJson.length; i++){ x.push(chartJson[i].run_date); y0.push(chartJson[i].diviationMinus); y1.push(chartJson[i].diviationPlus); } d.x = x; d.y1 = y1; d.y0 = y0; var area = d3.svg.area() .x(function(d) {return x(d.x); })

Jfree chart change Y axis data

怎甘沉沦 提交于 2019-12-24 17:29:57
问题 I am using Jfree chart 0.9.20's XYLineChartDemo for plotting the execution time of running processes in a program. My X axis denotes the time and Y axis should denote the Pid. How can I edit the Jfreechart files to make my Y axis to denote values I want and not numbers 0-range?? Also is there a way to make the line plotted to be made thicker in width? 回答1: study this: public JFreeChart createChart(String axisX, String axisY){ JFreeChart chart = ChartFactory.createTimeSeriesChart(null, axisX,

Google chart annotations move to back when generating image

南笙酒味 提交于 2019-12-24 17:27:50
问题 I'm working on a project that they need google chart to be save as an image. But when convert to image using "chart.getImageURI()" the base64 string generated makes annotations move back. please check the code snippet attached. I checked the documentation but was unable to find anything there as well. I tried "alwaysOutside: true" and "z-index: " properties as well. Does anyone have any idea? <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">

How to draw chart using WPF and IronPython

半腔热情 提交于 2019-12-24 17:01:45
问题 I'm a french beginner dev and I need to draw charts using WPF and IronPython. I'm coding with MVS2010 and I didn't find any help on Google. Does anybody have an idea ? Something to help me ? Thanks all, Ben 回答1: Charting is difficult, and it's usually best to rely on a tried-and-true library like ChartFX and invest your time and energy into solving real business problems. If you have difficulty convincing your management to purchase the library, divide the cost by your weekly pay and think

Styling of charts externally

笑着哭i 提交于 2019-12-24 16:25:12
问题 Is it possible to translate(detach) bar colors stated in js file to separate css stylesheet. How to assign classes to this values? /* Bar dashboard chart */ Morris.Bar({ element: 'dashboard-bar-1', data: [ { y: 'Oct 10', a: 100, b: 35 }, { y: 'Oct 11', a: 34, b: 156 }, { y: 'Oct 12', a: 78, b: 39 }, { y: 'Oct 13', a: 200, b: 70 }, { y: 'Oct 14', a: 106, b: 79 }, { y: 'Oct 15', a: 120, b: 80 }, { y: 'Oct 16', a: 126, b: 41 } ], xkey: 'y', ykeys: ['a', 'b'], labels: ['Unique', 'Returned'],

WinForms Chart control - Show labels between ticks

ぃ、小莉子 提交于 2019-12-24 16:09:58
问题 By default the WinForms Chart control shows labels centrally below the ticks. Is there any way to change that so that the labels are shown between the ticks instead, as per this image: 回答1: I think the only way to do this would be to use custom labels. That means taking over the job of adding the labels from the control and doing it manually yourself, which may or may not be suitable in your case. The "Labeling Axes Using Custom Labels" section of the MSDN documentation describes this in more