charts

chart.getSelection() does not work properly with google bar charts

大城市里の小女人 提交于 2019-12-12 20:08:01
问题 drawBarChart = function (data) { //few statements goes here which sets options which are being passed to chartDraw i.e. t.options.chart.options gChart = new google.visualization.BarChart(chartingPlace); //setTimeout(function () { // t.options.chart.options.height = ((t.chart.size.height) - 40) + "px"; ////console.log(JSON.stringify(t.options.chart.options)); //google.visualization.events.addListener(gChart, 'ready', function () { // grab a few details before redirecting google.visualization

Google Column Chart with two columns

99封情书 提交于 2019-12-12 20:03:04
问题 How to approach a column chart when having month and year. My data is in this format ['Group','Count','Month','Year'], ['A',10,'February',2015], ['B',8,'February',2015], ['C',15,'February',2016] Aim is to create a column chart which has X-axis as Month and Y-axis as Count . Now X-axis should have Count for years grouped by month. Something like this - I tried to simply pass the above data to see what I can get, but I get error. Any way to assign Axis the values based on year grouped by month

fill one color in google chart

China☆狼群 提交于 2019-12-12 19:45:51
问题 We are trying to fill only one color in google area chart, with different line color. If we use isStacked:true then it will change chart representation (change y-axis max coordinate) we want to fill only one color (green color below the max border in chart). fiddle 回答1: You mean like this: https://jsfiddle.net/7uyz541m/1/ or this: https://jsfiddle.net/7uyz541m/2/ ? You can set the areaOpacity to zero to remove the filling of a series. The difference between the first and second jsfiddle link

angular2 chart and events

不羁的心 提交于 2019-12-12 19:38:55
问题 I am using zingchart in my angular2 application and came a cross this problem. My data for the chart have changed i need to rerender the chart and I just don't know how to do that? this is the plunkr that the zing chart team provided with my button of rerender. I don't know how to rerender the chart. https://plnkr.co/edit/OjqvVPiyKBUJbKgcLi6A?p=preview import {bootstrap} from 'angular2/platform/browser'; import {Component, NgZone, AfterView, OnDestroy} from 'angular2/core' class Chart { id:

Hide a row (aka series) in Google chart

孤者浪人 提交于 2019-12-12 19:25:49
问题 Is there please a possibility to blend out (hide) a line in Google Line Chart? We have many line charts with multiple series of close data values and my boss asks me to add a way to hide a series (preferably by clicking the line or the legend with a mouse). I have added a select event listener to my very simple test case below (just open it in a browser and it will work), but I'm not sure what to do next: <!DOCTYPE HTML> <html> <head> <script type="text/javascript" src="https://ajax

Loop over JSON data to create d3 pie charts

余生长醉 提交于 2019-12-12 19:16:24
问题 I've succeeded in creating my first pie chart with d3 and JSON, but I'm struggling to get more than one pie chart to appear. I've reviewed numerous examples, including Mike Bostock's donut-multiples, and it appears I need a for-each loop in my code. Here's a simplified version of my program which produces one pie chart instead of two: <!doctype html> <html> <head> <title>Pie Chart Test</title> <meta charset="UTF-8"> <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"><

dc.js / crossfilter dimensions (year / week)

青春壹個敷衍的年華 提交于 2019-12-12 19:15:28
问题 I can't make a correct graph showing the data group by week (and different years). pseudo SQL would give: select sum ('task') group by 'year', 'week' (and maybe later 'site') My data looks more or less like this: { "date" : "20150427", "week" : 18, "site" : "a" "task" : 3, } { "date" : "20150427", "week" : 18, "site" : "b" "task" : 4, } { "date" : "20150427", "week" : 18, "site" : "c" "task" : 2, } { "date" : "20150427", "week" : 18, "site" : "d" "task" : 3, } { "date" : "20150428", "week" :

Export Google Chart to Excel

久未见 提交于 2019-12-12 19:15:14
问题 There is a requirement to export Google charts as such into Excel. Is there way to achieve the same through jquery? From the Google Chart documentation, I understand the chart can be converted to an image by getting ImageURI. But when tried to export the image using ImageURI (please refer link-2) its is not loaded in the excel file. Reference: https://developers.google.com/chart/interactive/docs/printing $("[id$=myButtonControlID]").click(function(e) { window.open('data:application/vnd.ms

How fill area in GoogleCharts AreaChart with gradient color?

孤者浪人 提交于 2019-12-12 18:32:43
问题 With my google Chart I use this options: chartOptions: { hAxis: { title: 'Tasks' }, vAxis: { title: 'Duration' }, animation:{ duration: 2000, startup: true }, colors: ['#6f9654'] } How Can I change the color of the area under the graph and how can I fill it with a gradient? (I don't want to fill the background of the whole diagramm) I don't find any docs on google documentation so far. Is it even possible? Is there a trick? UPDATE : The Result on @whiteHats solution with my adaptations.: 回答1:

Wordpress ~ how to display more than one Google Chart on a page?

拟墨画扇 提交于 2019-12-12 18:19:30
问题 Here is code for one Google chart that I inserted into a raw HTML Block in WordPress Visual Composer -- chart ID name is 'chart_div1' -- this works on my WP webpage. # <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript"> google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['X','Y'], [8,12], [6.5,7] ]);