[visualization-api] Re: Issues moving to FrozenCharts
Hi all - again, probably missed something obvious but am still having issues getting Maps to work with Frozen Charts. https://jsfiddle.net/w0mwbr97/ Two things occur with this fiddle: - Filters work but seem to have lost their styling - After around 10 seconds the map fails to load and returns 'google[sd] is not a function'. Any help appreciated! A -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/352d2eca-6e66-4bbb-b5e8-c942cd8ef762%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [visualization-api] Re: Issues moving to FrozenCharts
Thank you sir - adding the separate jsapi load did indeed resolve the issue with that fiddle. I'll do some further testing with my dashboards and if anything else crops up I'll let you know. Thanks, Dan -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/dca88920-daf6-405b-b64f-8185f109e131%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[visualization-api] Re: I am able to exporting Google Visualization tables into excel - however I need to export them in separate excel sheets, any ideas?
Hey Rishu. I'm afraid I don't have a full answer for you, but I just wanted to point out that in the above you're not actually outputting to an Excel file, you're creating a CSV file and both are very different. CSV files are plain text and do not support multiple sheet, so you will need another method for generating a true Excel file. A quick Google came up with http://excelbuilderjs.com/ which is a library that should help you generate a true Excel file. Hope that helps. -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/906ba64a-fdf9-4958-a12d-51d232c8dff5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [visualization-api] Re: I am able to exporting Google Visualization tables into excel - however I need to export them in separate excel sheets, any ideas?
Sorry Rishu thats not something that I can help with - if there is no forum/way to get help with that script, do a few searches and you'll probably find a couple of frameworks that allow you to do the same thing. -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/0591fe04-f646-4072-af70-755d1dcc55a3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[visualization-api] Issues moving to FrozenCharts
Hi all. Following the imminent update I've been trying to modify a number of my pages as listed in the Frozen Charts example, and haven't been able to get any chart working. I've modified my normal boilerplate JSFiddle which I use a a base when giving examples here and in SO with the changes made: https://jsfiddle.net/danabnormal/m7o9L0eg/ This results in functions being marked as undefined and is the simplest level I could get. It is entirely possible I'm missing something obvious as I'm knackered, but any help would be appreciated. Thanks, Dan -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/0d16b3d1-c45b-4d98-ae05-5e925cb52124%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[visualization-api] Re: Introducing Frozen Google Charts
This isn't tested but from what I understand you would need to modify your code as below: On Wednesday, 19 August 2015 03:02:14 UTC+1, Patrick Beaudan wrote: Does the *google.charts.load(**'41'**,* {packages: ['corechart']}); work for all packages? It seems to not work for me for a gauge chart for instance code below: google.charts.load(41, {packages:[corechart, gauge]}); google.charts.setOnLoadCallback(drawChart); function drawChart() { $.ajax({ url: charts/chart_handler.php?chart=risk_return_gauge, dataType:json, success: function (jsonData) { var data = new google.visualization.DataTable(jsonData); // Create our data table out of JSON data loaded from server. var options = { width: 150, height: 150, yellowFrom: 75, yellowTo: 100, greenFrom: 25, greenTo: 75, minorTicks: 5 }; var chart = new google.visualization.Gauge(document.getElementById('chart_riskReturnGauge_small')); chart.draw(data, options); } }); } On Tuesday, July 28, 2015 at 5:11:12 AM UTC-7, Daniel LaLiberte wrote: *Introducing Frozen Google Charts* When we push out new releases of Google Charts, some of the changes are big, like entirely new chart types, but other changes are small, like enhancements to the appearance or behavior of existing charts. Many Google Chart creators fine-tune the look and feel of their charts until it's exactly what they want. Some of those users might feel more comfortable knowing that their charts will never change, regardless of what improvements we make in the future. For those users, we're proud to announce Frozen Google Charts. To load a frozen version, you must make some small changes in how you load the Google Charts packages. For example, here is the usual way of loading the stable version and drawing a chart: script type=text/javascript src=https://www.google.com/jsapi;/script script type=text/javascript google.load('visualization', '1', {packages: ['corechart']}); google.setOnLoadCallback(drawChart); /script You'll need to change your code to be like this (changes highlighted in bold): script type=text/javascript src=*https://www.gstatic.com/charts/loader.js* https://www.gstatic.com/charts/loader.js/script script type=text/javascript *google.charts.load(**'41'**,* {packages: ['corechart']}); *google.charts.setOnLoadCallback*(drawChart); /script Note that when you call google.charts.load(), you should not include the ‘visualization’ parameter, and the version number is a string. Only version ‘41’ is supported at this time, which corresponds to the current stable release, and additional frozen versions will be announced as we push out each new stable release. More details about using the frozen version loader will be available here https://google-developers.appspot.com/chart/interactive/docs/library_loading_enhancements . When you use a frozen version of Google Charts, all charts and features should work the same as for the stable version it was created from. But there are two minor, though important, limitations with loading frozen versions, which we expect to resolve in the near future. 1. You can only call google.charts.load() one time. You can instead list all the packages that you'll need in one call, so there is usually no need to make separate calls. 2. If you are using a ChartWrapper, you must explicitly load all the packages you'll need rather than relying on the ChartWrapper to automatically load them for you. We expect that frozen versions will remain available indefinitely, though we may retire frozen versions that have security concerns. We will typically not provide support for frozen versions, except to suggest upgrading to newer versions. Even if you don't plan to use the frozen version 41, it would help us if you could try it now with your charts and please let us know if you experience any problems. -- Daniel LaLiberte https://plus.google.com/100631381223468223275?prsrc=2 - 978-394-1058 dlali...@google.com 5CC, Cambridge MA daniel.l...@gmail.com 9 Juniper Ridge Road, Acton MA -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/a740f3f9-c6ba-46ef-88ef-4dfdedd5caff%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [visualization-api] Issues moving to FrozenCharts
Cheers for that. I'll see if there are any loading order fixes I can apply to my 'proper' pages, and let you know either way the result. -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/f2cfb212-4646-4588-a17a-040cda99ef8b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[visualization-api] Re: Just started getting You called the draw() method with the wrong type of data rather than a DataTable or DataView× error
Are you referring to version '1' in your code? I had issues today, changing to '1.0' fixed it for me. On Tuesday, 18 August 2015 05:43:02 UTC+1, tim wrote: Hi, As of this morning, all of the sites using our custom dashboard are reporting the error: You called the draw() method with the wrong type of data rather than a DataTable or DataView× on all Google chart blocks. Has anything just been rolled out that might be causing this? Thanks a lot. -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/f35b9cbc-b2d1-4975-83d2-79cebfc3c21e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[visualization-api] Re: Introducing Frozen Google Charts
Hi Daniel. I've seen a number of posters both here and in GitHub experiencing issues this morning related to version '1' being referenced. Changing this to '1.0' has been a fix. However I've had both a reply to your previous thread and a new thread aimed at helping with this issues deleted. Could you at least please post a sticky regarding '1' v '1.0'? As it stands if people follow the sample code on the Google Charts site, they will reference v1 and have issues. Cheers, Dan -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/96c80aae-8974-4365-a03a-14af71016eb1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[visualization-api] Issue with charts as of this morning
I posted the following as a reply to the new version announcement but for some reason it got deleted - I am reposting here in case it helps others. tldr; if you are referring to version '1' of charts, try changing the reference to '1.0'. Heya. Following from this, I've been getting errors on pages that reference version '1' of the charts - you can see the full message at http://i.imgur.com/GHh7f9Z.png . Changing the load statements to explicitly point to '1.0' appears to be fixing it though. The only reason I referenced version '1' was habit from following the samples given on the main Google Charts site (Maps being one but a quick check and Bar also references '1' so others might exist). Cheers! Dan -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/8a2b9626-7aac-4682-9d74-dcc7ba24e9f6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[visualization-api] Re: Google Charts V42 Release Candidate Update Pushed: April 30, 2015
Heya. Following from this, I've been getting errors on pages that reference version '1' of the charts - you can see the full message at http://i.imgur.com/GHh7f9Z.png . Changing the load statements to explicitly point to '1.0' appears to be fixing it though. The only reason I referenced version '1' was habit from following the samples given on the main Google Charts site (Maps being one but a quick check and Bar also references '1' so others might exist). Cheers! Dan -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/743836a6-b96a-43cd-a263-6908b2bdccdc%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[visualization-api] Re: How to get local JSON file into html file
You absolutely can! On the download page theres a Mac installer that'll sort it all for you. On Monday, 27 July 2015 16:29:37 UTC+1, Tim Steele wrote: I think that is a great suggestion, however I am on a MAC, so I don't believe I can use apache? On Monday, July 27, 2015 at 2:48:22 AM UTC-7, Daniel Buttery wrote: I'd recommend using something like XAMPP on your machine ( https://www.apachefriends.org/index.html). Its a very quick, easy way to spin up a web server on your PC so you can edit and code locally yet still view the results in a browser over HTTP. On Monday, 27 July 2015 04:30:52 UTC+1, Tim Steele wrote: Hey there, I have a JSON file of data I downloaded from San Francisco Police Department. I wanted to create a chart for this data displaying different crime statistics. However I'm not sure how to load the data into HTML locally? It seems it is impossible due to security issues? I just wanted to double check and see what my next best route would be. Thanks -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
[visualization-api] Re: How to get local JSON file into html file
I'd recommend using something like XAMPP on your machine (https://www.apachefriends.org/index.html). Its a very quick, easy way to spin up a web server on your PC so you can edit and code locally yet still view the results in a browser over HTTP. On Monday, 27 July 2015 04:30:52 UTC+1, Tim Steele wrote: Hey there, I have a JSON file of data I downloaded from San Francisco Police Department. I wanted to create a chart for this data displaying different crime statistics. However I'm not sure how to load the data into HTML locally? It seems it is impossible due to security issues? I just wanted to double check and see what my next best route would be. Thanks -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
[visualization-api] Re: SQL Server + Charts (Using PHP, HTML..)
Hey. I'm using Google Charts with ASP.Net successfully, but have it running in a certain way. The charts themselves are generated by JavaScript on the page rather than .Net - however I use a ASP.Net Web Service which is responsible for connecting to SQL and providing the data in JSON format (http://www.c-sharpcorner.com/UploadFile/8ef97c/web-service-in-Asp-Net-part-4/) . This makes it easy to use the SQL data in JavaScript while allowing you to fiddle with the data using the .Net language of your choice. On Monday, 13 July 2015 14:01:27 UTC+1, Sophie Bannerman wrote: Hi all, I have a request for a project I'm working on to provide a web front end with charts (Line and Bar) using the data from an SQL Server Management Studio on a web page. My question/ advice I'm looking for is: - Can you recommend a chart library to use? (Google charts?) - Is it possible to do this without using ASP.NET? - Link me with tutorials? - Any advice? I can expand on this topic, it's quite vague at the moment as I'm not sure where i'm going with this yet and generally looking for advice and help! Thanks! -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
[visualization-api] Re: How to save Chart in a chartwrwpper to an image
To get an image version of a chart in a chartwrapper, you need to use .getChart().getImageURI() (so in your case wrapper.getChart().getImageURI() ). Heres a fiddle I threw together for someone previously who had the same question: https://jsfiddle.net/kujxsn7z/ On Monday, 15 June 2015 19:34:23 UTC+1, Mike Pala wrote: I have a chart in a google ChartWrapper which is created by the ChartEditor function loadEditor() { var data = new google.visualization.DataTable(?=$jsonTableA01?) wrapper = new google.visualization.ChartWrapper({ dataTable: data, left:1, options: { 'chartArea': {width: '60%', left: 45}, 'legend' :'none', 'title':'Number of Newly Opened Roles per ?echo $_SESSION['Display']?' } }); chartEditor = new google.visualization.ChartEditor(); google.visualization.events.addListener(chartEditor, 'ok', redrawChart); chartEditor.openDialog(wrapper, {});} I now need another function linked to a button which will save that chart to an image file. Canvas2html does not work. It drops all formatting and colors, columns are not visible, and the text (labels, legends, values, etc) overlaps and is smooshed together. -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
[visualization-api] Re: Are sankey titles appearing for anyone?
Hi. I haven't used sankeys personally, but I don't see any option for a title in the documentation so its likely not supported - https://developers.google.com/chart/interactive/docs/gallery/sankey#configuration-options On Wednesday, 3 June 2015 17:32:46 UTC+1, InnerIT wrote: I've easily and happily created my first sankey diagram and want to add a title to it. Whether I use title: or 'title': in the option argument, nothing appears. Has anyone else had success? Thanks! -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
[visualization-api] Re: google graph timeline month crossing date bug produces invalid data at row x
Hi! I'm not Google, but new Date(2015, 5, 31, 18, 30, 0) June doesn't have 31 days... ;) JavaScript months start at 0 instead of 1, so month 0 is January and month 5 is June, which has 30 days. Don't ask why. Its a pain. You'll need to take 1 away from each of your months and it will work fine. See https://jsfiddle.net/vkhtys7x/ . On Friday, 5 June 2015 08:07:29 UTC+1, Theo Ekelmans wrote: Hi, I've stumbled across a bug in the timeline. When you have a month crossing entry in the data like the Ordina block in the example [ 'Ordina', 'Ordina_Backup_Full', new Date(2015, 6, 1, 18, 30, 0), new Date(2015, 6, 2, 2, 0, 38) ], You this error: Invalid data at row #0: start(Wed Jul 01 2015 18:30:00 GMT+0200 (W. Europe Daylight Time)) end(Wed Jul 01 2015 04:14:27 GMT+0200 (W. Europe Daylight Time)).× Remove that row, and all is well.. Any programmer @ google up for the challenge ? Grtz, Theo Ekelmans The Netherlands html head META HTTP-EQUIV=refresh CONTENT=3 script type=text/javascript src= https://www.google.com/jsapi?autoload={'modules':[{'name':'visualization ','version':'1','packages':['timeline']}]}/script script type=text/javascript google.setOnLoadCallback(drawChart); function drawChart() { var container = document.getElementById('JobTimeline'); var chart = new google.visualization.Timeline(container); var dataTable = new google.visualization.DataTable(); dataTable.addColumn({ type: 'string', id: 'Position' }); dataTable.addColumn({ type: 'string', id: 'Name' }); dataTable.addColumn({ type: 'date', id: 'Start' }); dataTable.addColumn({ type: 'date', id: 'End' }); dataTable.addRows([ [ 'Ordina', 'Ordina_Backup_Full', new Date(2015, 5, 31, 18, 30, 0), new Date(2015, 6, 1, 4, 14, 27) ], [ 'Ordina', 'Ordina_Backup_Full', new Date(2015, 5, 30, 18, 30, 0), new Date(2015, 5, 31, 4, 56, 46) ], [ 'Ordina', 'Ordina_Backup_Full', new Date(2015, 6, 2, 18, 30, 0), new Date(2015, 6, 3, 2, 13, 9) ], [ 'DWH Productie', 'Productie_DWH_Export wekelijks en eerste dag van de maand', new Date(2015, 6, 1, 6, 0, 0), new Date(2015, 6, 1, 7, 2, 40) ], [ 'DWH Productie', 'Productie_DWH_Export wekelijks en eerste dag van de maand', new Date(2015, 6, 2, 6, 0, 0), new Date(2015, 6, 2, 7, 23, 20) ], [ 'DWH Productie', 'Productie_DWH_ProcessFullCubes', new Date(2015, 6, 3, 7, 27, 17), new Date(2015, 6, 3, 8, 40, 42) ], [ 'DWH Productie', 'Productie_DWH_ProcessFullCubes', new Date(2015, 6, 1, 3, 56, 47), new Date(2015, 6, 1, 5, 9, 17) ], [ 'DWH Productie', 'Productie_DWH_ProcessFullCubes', new Date(2015, 5, 31, 3, 48, 48), new Date(2015, 5, 31, 4, 59, 28) ], [ 'DWH Productie', 'Productie_DWH_ProcessFullCubes', new Date(2015, 6, 2, 8, 58, 54), new Date(2015, 6, 2, 10, 14, 37) ], [ 'DWH Productie', 'productie_DWH_Email', new Date(2015, 6, 2, 6, 15, 0), new Date(2015, 6, 2, 6, 45, 3) ], [ 'DWH Productie', 'productie_DWH_Email', new Date(2015, 6, 3, 6, 15, 0), new Date(2015, 6, 3, 6, 45, 16) ], ]); chart.draw(dataTable); } /script /head body div id=JobTimeline style=width: 1885px; height: 900px;/div /body /html -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
[visualization-api] Re: connecting to a SQL Server database
Hi Jaya. I do a lot with Google Charts and ASP.Net / MS SQL backends. The easiest way I've found is to have an ASP.Net Web Service configured to return JSON data. The service connects to your SQL server, and your JS script gets its data from the web service. Its not ideal, but allows a lot of flexibility. I'm not able to give you some example code at the moment, but hopefully that might give you some ideas. On Tuesday, 2 June 2015 20:03:46 UTC+1, Jaya wrote: Hi, We are using a software tool to build charts and dashboards that connects to various data-sources and displays the charts/dashboards. We would like to start using Google charts and dashboards but I am unable to figure out how to make the connection to the SQL Server database and after the connection is made how do I pull the data and display it as a table to test that the connection has been successfully established. Please help! Thanks, -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
Re: [visualization-api] Re: GeoChart Countries being displayed incorrectly
Hey Sergey. I was hoping to use this chart in a similar way for International data, so thought I'd chime in. :) Would it be possible to have an option for the chart that forces it to interpret given locations at a certain regional level? For example you could have forceDistrictISO = true; or forceNationalISO=true; . That way us lowly international peeps could ensure that the chart doesn't incorrectly guess what data we're providing. Thanks! Dan On Tuesday, 2 June 2015 16:20:29 UTC+1, Sergey wrote: I completely agree that the behavior is not ideal, but we can't exactly do anything to fix it either. I'll file an internal bug to document this better. On Tue, Jun 2, 2015 at 3:48 AM Diogo Ribeiro diogota...@gmail.com javascript: wrote: Thanks a lot for your help Daniel Sergey. Should I create a bug reporting this issue? I didn't find this information stated in https://developers.google.com/chart/interactive/docs/gallery/geochart#markers-mode-format On Mon, Jun 1, 2015 at 2:44 PM, 'Sergey Grabkovsky' via Google Visualization API google-visua...@googlegroups.com javascript: wrote: Hi Diogo, For 'markers' mode, we use Google Maps for geocoding the locations (converting a string location to a latitude and longitude), and so ambiguous locations may not get geocoded as you might expect. Because of this, even though we recommend ISO 3166 codes to be used for 'regions' mode, 'markers' mode winds up working best with longer names (like Germany, Argentina, etc) where there is no ambiguity. On Mon, Jun 1, 2015 at 7:42 AM Daniel Buttery hasanyones...@googlemail.com javascript: wrote: Looks like a mixup with Country Codes that match 'regional' codes (DE = Delaware, AR = Arkansas). https://jsfiddle.net/23rzy5qv/ GB (UK) works fine as there is no matching regional code, but SE (Sweden) goes to South America. Working fine if you change the country codes to country names, but obviously thats not what you're after. I'm sure someone will swing by soon and let us know if its a bug! On Monday, 1 June 2015 12:03:08 UTC+1, Diogo Ribeiro wrote: Hi guys, Could you help me discover why some countries are being displayed incorrectly? I have google.setOnLoadCallback(drawRegionsMap); function drawRegionsMap() { var data = new google.visualization.DataTable(); data.addColumn('string', 'Country'); data.addColumn('string', 'Name'); data.addColumn('number', 'P1'); data.addRows([ ['DE','Germany', 228], ['AR','Argentina', 53], ['US','USA', 7746] ]); var options = { region: 'world', displayMode: 'markers', backgroundColor: '#B3D1FF', minValue: 0, colors: ['#A1FF8E', '#008042'] }; var chart = new google.visualization.GeoChart(document. getElementById('chart_div')); chart.draw(data, options); }; Both Argentina and Germany are being displayed in USA? Thanks in advance. -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com javascript:. To post to this group, send email to google-visua...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to a topic in the Google Groups Google Visualization API group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/0VHgOVeFf_E/unsubscribe . To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsubscr...@googlegroups.com javascript:. To post to this group, send email to google-visua...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com javascript:. To post to this group, send email to google-visua...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send
[visualization-api] Re: GeoChart Countries being displayed incorrectly
Looks like a mixup with Country Codes that match 'regional' codes (DE = Delaware, AR = Arkansas). https://jsfiddle.net/23rzy5qv/ GB (UK) works fine as there is no matching regional code, but SE (Sweden) goes to South America. Working fine if you change the country codes to country names, but obviously thats not what you're after. I'm sure someone will swing by soon and let us know if its a bug! On Monday, 1 June 2015 12:03:08 UTC+1, Diogo Ribeiro wrote: Hi guys, Could you help me discover why some countries are being displayed incorrectly? I have google.setOnLoadCallback(drawRegionsMap); function drawRegionsMap() { var data = new google.visualization.DataTable(); data.addColumn('string', 'Country'); data.addColumn('string', 'Name'); data.addColumn('number', 'P1'); data.addRows([ ['DE','Germany', 228], ['AR','Argentina', 53], ['US','USA', 7746] ]); var options = { region: 'world', displayMode: 'markers', backgroundColor: '#B3D1FF', minValue: 0, colors: ['#A1FF8E', '#008042'] }; var chart = new google.visualization.GeoChart(document. getElementById('chart_div')); chart.draw(data, options); }; Both Argentina and Germany are being displayed in USA? Thanks in advance. -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
[visualization-api] Re: Data not loading on Line Chart - using ASP.NET MVC and jQuery AJAX.
Hey. First thing I always try if I come across issues like this is to add a chart of type Table to the page, as you can then verify easily exactly the type of data the chart has in case something odd is happening. So at the bottom of your code, add: var tableOptions={}; var dataTable = new google.visualization.LineChart(document.getElementById( 'test-table')); dataTable.draw(data, tableOptions); Its also possible that your date string isn't being interpreted correctly - you have WeekOfEntry set as a String type but your JSON looks like a date. I normally reconstruct dates when importing just to be sure (especially as I'm in the UK so I can guard against the day/month format flip. See https://developers.google.com/chart/interactive/docs/datesandtimes for some examples. On Friday, 29 May 2015 18:08:07 UTC+1, chrismar...@gmail.com wrote: I'm using ASP.NET MVC and Google Charts to try and generate a simple line graph with two data records. I'm pulling the data successfully from the database, but the data isn't appearing on my chart. The data consists of two records with two fields: WeekOfEntry(DateTime) and Weight (decimal). The chart appears, but the data points aren't there. I'm guessing my data is formatted improperly? Here's my javascript: script type=text/javascript //Load the Visualization API library and the linechart library. google.load('visualization', '1.0', { 'packages': ['corechart'] }); //Set a callback to run when the Google Visualization API is loaded. google.setOnLoadCallback(drawLoseATonLineChart); //Callback that creates and populates a data table, instantiates the line chart, //passes in the data, and draws it. function drawLoseATonLineChart() { var url = @Url.Action(GetChartStatistics); var jsonData = $.ajax({ method: 'GET', url: url, dataType: 'JSON', async: false }).responseText; var data = new google.visualization.DataTable(); data.addColumn('string', 'WeekOfEntry'); data.addColumn('number', 'Weight'); for (var i = 0; i data.length; i++) { data.addRow([jsonData[i].WeekOfEntry, jsonData[i].Weight]); } var options = { title: 'Weight Progression', legend: { position: 'right', alignment: 'center' }, vAxis: { title: 'Weight' }, hAxis: { title: 'Week', slantedText: true, slantedTextAngle: 45 }, colors: ['E81A00'] }; var chart = new google.visualization.LineChart(document.getElementById('lose-a-ton-line-chart')); chart.draw(data, options); } /script Here's part of my `GetChartStatistics()` method: var lineChartData = (from a in db.Associates join aw in db.AssociateWeights on a.RegistrationId equals aw.RegistrationId where a.EventId == eventId a.Username == currentuser select new LineChartData { Weight = aw.Weight, WeekOfEntry = aw.WeekOfEntry }); return Json(lineChartData, JsonRequestBehavior.AllowGet); Here's how my JSON data is formatted when it gets returned: `[{Weight:190.0,WeekOfEntry:\/Date(143192160)\/},{Weight:121.0,WeekOfEntry:\/Date(143252640)\/}]` -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
Re: [visualization-api] Re: Data not loading on Line Chart - using ASP.NET MVC and jQuery AJAX.
Very true sir - the coffee obviously hadn't really set in yet. ;) -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
[visualization-api] Bad link on Google Charts website...
Hey all, liking the new look! FYI the GitHub link on the support page https://developers.google.com/chart/interactive/support is pointing to https://github.com/google-admin/google-visualization-api-issues instead of https://github.com/google/google-visualization-issues/issues and causing a 404. Cheers! Dan -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
[visualization-api] Re: Google areachart adding gridlines or ticks on haxis
Without seeing some sample data its tricky to tell, however have you can try inserting a 'dummy' row to the end of your data - I think that will force the hAxis to draw as you want. https://developers.google.com/chart/interactive/docs/reference#addrow On Wednesday, 27 May 2015 14:19:29 UTC+1, Mark wrote: Hello, I’m trying to make a areachart with a haxis counting from 0:00 to 23:00. But since the data stops at the current time today it doesn't count further. What I've got: http://s11.postimg.org/8pri32gpv/Untitled_1.jpg What I want: http://s7.postimg.org/qaxccqc1n/Untitled_3.png I tried using gridlines.count and ticks on the haxis but this only seems to work on the vaxis. This is what my code looks like: google.setOnLoadCallback(drawVisualization); function drawVisualization () { var query = new google.visualization.Query('https://#appspot.com/query?id=#format=data-table-response' http://appspot.com/query?id=#%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23format=data-table-response'); query.send(function (response) { var data = response.getDataTable(); data.setColumnLabel(1, 'test'); var sts_transactions_year_hourWrapper = new google.visualization.ChartWrapper({ containerId: test, dataTable: data, chartType: AreaChart, options: {showRowNumber:false, title:'test', titleTextStyle: {color: '#fff', bold:false, fontSize:11}, fontSize:'12', legend:'none', areaOpacity:'0.25', backgroundColor:'transparent', colors:['#fff'], chartArea: {width: '570', height: '200', left:35, top:50}, hAxis: {textStyle : {fontSize: 11, color:'#fff'}, showTextEvery : 2, slantedTextAngle : 45, slantedText: true, }, vAxis: { textStyle : {fontSize: 12, color:'#fff'}, }, }, // change date format view: { columns:[{ type: 'string', label: data.getColumnLabel(0), calc: function (dt, row) { var dateString = dt.getValue(row, 0); var year = dateString.substring(0, 4); var month = dateString.substring(4, 6); var day = dateString.substring(6,8); var hour = dateString.substring(8); var date = hour + ':00'; return date; } }, 1]} }); sts_transactions_year_hourWrapper.draw(); }); } -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
[visualization-api] Re: Google areachart adding gridlines or ticks on haxis
Without seeing some dummy data I can't test this, but if you insert a dummy row at the end of your data with a time of '23:01' I think the hAxis should draw as you want. You can use the addRow command to append data to your dataset: https://developers.google.com/chart/interactive/docs/reference#addrow On Wednesday, 27 May 2015 14:19:29 UTC+1, Mark wrote: Hello, I’m trying to make a areachart with a haxis counting from 0:00 to 23:00. But since the data stops at the current time today it doesn't count further. What I've got: http://s11.postimg.org/8pri32gpv/Untitled_1.jpg What I want: http://s7.postimg.org/qaxccqc1n/Untitled_3.png I tried using gridlines.count and ticks on the haxis but this only seems to work on the vaxis. This is what my code looks like: google.setOnLoadCallback(drawVisualization); function drawVisualization () { var query = new google.visualization.Query('https://#appspot.com/query?id=#format=data-table-response' http://appspot.com/query?id=#%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23%23format=data-table-response'); query.send(function (response) { var data = response.getDataTable(); data.setColumnLabel(1, 'test'); var sts_transactions_year_hourWrapper = new google.visualization.ChartWrapper({ containerId: test, dataTable: data, chartType: AreaChart, options: {showRowNumber:false, title:'test', titleTextStyle: {color: '#fff', bold:false, fontSize:11}, fontSize:'12', legend:'none', areaOpacity:'0.25', backgroundColor:'transparent', colors:['#fff'], chartArea: {width: '570', height: '200', left:35, top:50}, hAxis: {textStyle : {fontSize: 11, color:'#fff'}, showTextEvery : 2, slantedTextAngle : 45, slantedText: true, }, vAxis: { textStyle : {fontSize: 12, color:'#fff'}, }, }, // change date format view: { columns:[{ type: 'string', label: data.getColumnLabel(0), calc: function (dt, row) { var dateString = dt.getValue(row, 0); var year = dateString.substring(0, 4); var month = dateString.substring(4, 6); var day = dateString.substring(6,8); var hour = dateString.substring(8); var date = hour + ':00'; return date; } }, 1]} }); sts_transactions_year_hourWrapper.draw(); }); } -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
[visualization-api] Problem recreating Timeline in Bootstrap Model after onClick()
https://jsfiddle.net/4r04788w/ I'm populating a Timeline with the data in the attached fiddle, and then calling some JS so that when a button is clicked you can get an enlarged view in a Bootstrap Modal. In the above example I'm grabbing the data from the chart itself (in preperation for making the code reusable), creating a Modal and populating a DataTable with the data - all looks as expected. However if you change from 'Table' to 'Timeline' in row 100 of the JS, it mucks up. Any ideas?? Thanks! Dan -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
Re: [visualization-api] Problem recreating Timeline in Bootstrap Model after onClick()
Hey, cheers for the response. Just done a quick search off the back of your comments and found this: https://code.google.com/p/google-visualization-api-issues/issues/detail?id=1692 Looks like there are (or were) some incompatibilities between Charts and the Bootstrap modal dialog. I'll have a poke about and see if theres anything specific I can find and work around. Cheers! Dan On Monday, 11 May 2015 15:21:34 UTC+1, Daniel LaLiberte wrote: Daniel, I haven't figured out everything that is going on in your example, but your modal dialog seems to be messing with the context in a way that confuses the charts code. If I just replace the element that it draws in with a simple div, it works: https://jsfiddle.net/4r04788w/2/ If you can figure out what the model dialog might be doing that triggers this confusion, maybe we can do something about it. On Mon, May 11, 2015 at 8:50 AM, Daniel Buttery hasanyones...@googlemail.com javascript: wrote: https://jsfiddle.net/4r04788w/ I'm populating a Timeline with the data in the attached fiddle, and then calling some JS so that when a button is clicked you can get an enlarged view in a Bootstrap Modal. In the above example I'm grabbing the data from the chart itself (in preperation for making the code reusable), creating a Modal and populating a DataTable with the data - all looks as expected. However if you change from 'Table' to 'Timeline' in row 100 of the JS, it mucks up. Any ideas?? Thanks! Dan -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com javascript:. To post to this group, send email to google-visua...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout. -- Daniel LaLiberte https://plus.google.com/100631381223468223275?prsrc=2 - 978-394-1058 dlali...@google.com javascript: 5CC, Cambridge MA daniel.l...@gmail.com javascript: 9 Juniper Ridge Road, Acton MA -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
[visualization-api] Re: Problem recreating Timeline in Bootstrap Model after onClick()
Bug report submitted for anyone that comes across this post - https://code.google.com/p/google-visualization-api-issues/issues/detail?id=1979 On Monday, 11 May 2015 13:50:54 UTC+1, Daniel Buttery wrote: https://jsfiddle.net/4r04788w/ I'm populating a Timeline with the data in the attached fiddle, and then calling some JS so that when a button is clicked you can get an enlarged view in a Bootstrap Modal. In the above example I'm grabbing the data from the chart itself (in preperation for making the code reusable), creating a Modal and populating a DataTable with the data - all looks as expected. However if you change from 'Table' to 'Timeline' in row 100 of the JS, it mucks up. Any ideas?? Thanks! Dan -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
Re: [visualization-api] Problem recreating Timeline in Bootstrap Model after onClick()
Yeah it looks like it is a compatibility thing - if you add an ID to the 'modal-content' container and direct the chart to their, it fails. Once you strip the 'model-content' class from that div, it works. I'll throw together a new jsfiddle and submit a bug report. Thanks! Dan On Monday, 11 May 2015 15:32:16 UTC+1, Daniel LaLiberte wrote: I'm not sure how that incompatibility between Bootstrap's modal dialog and the charteditor would be related to the Timeline chart. But perhaps there are more issues of a similar nature. Let us know what you find. Thanks. On Mon, May 11, 2015 at 10:25 AM, Daniel Buttery hasanyones...@googlemail.com javascript: wrote: Hey, cheers for the response. Just done a quick search off the back of your comments and found this: https://code.google.com/p/google-visualization-api-issues/issues/detail?id=1692 Looks like there are (or were) some incompatibilities between Charts and the Bootstrap modal dialog. I'll have a poke about and see if theres anything specific I can find and work around. Cheers! Dan On Monday, 11 May 2015 15:21:34 UTC+1, Daniel LaLiberte wrote: Daniel, I haven't figured out everything that is going on in your example, but your modal dialog seems to be messing with the context in a way that confuses the charts code. If I just replace the element that it draws in with a simple div, it works: https://jsfiddle.net/4r04788w/2/ If you can figure out what the model dialog might be doing that triggers this confusion, maybe we can do something about it. On Mon, May 11, 2015 at 8:50 AM, Daniel Buttery hasanyones...@googlemail.com wrote: https://jsfiddle.net/4r04788w/ I'm populating a Timeline with the data in the attached fiddle, and then calling some JS so that when a button is clicked you can get an enlarged view in a Bootstrap Modal. In the above example I'm grabbing the data from the chart itself (in preperation for making the code reusable), creating a Modal and populating a DataTable with the data - all looks as expected. However if you change from 'Table' to 'Timeline' in row 100 of the JS, it mucks up. Any ideas?? Thanks! Dan -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visua...@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout. -- Daniel LaLiberte https://plus.google.com/100631381223468223275?prsrc=2 - 978-394-1058 dlali...@google.com 5CC, Cambridge MA daniel.l...@gmail.com 9 Juniper Ridge Road, Acton MA -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com javascript:. To post to this group, send email to google-visua...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout. -- Daniel LaLiberte https://plus.google.com/100631381223468223275?prsrc=2 - 978-394-1058 dlali...@google.com javascript: 5CC, Cambridge MA daniel.l...@gmail.com javascript: 9 Juniper Ridge Road, Acton MA -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
[visualization-api] TimeLine charts and seperate lines per sub-category
Hey all hope you can help: https://jsfiddle.net/4d5w8Lcq/ I have the above data which allows us to track when each team has applied effort to a given project over a certain period. I've gone through the docs and can't find an option to do this, but is it possible to get each 'Team' placed on to its own swimlane within the project itself? That probably doesn't make sense so heres a mockup of what I mean... https://lh3.googleusercontent.com/-aUcES6ZRKVI/VUHwJfEGFsI/QSo/bM1YRSnF2Eg/s1600/mock.png Many thanks! Dan -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
Re: [visualization-api] TimeLine charts and seperate lines per sub-category
Hi Sergey, thanks for the response! I figured it wasn't going to be possible currently, but wanted to confirm before I did put in a feature request. Many thanks! Dan -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
[visualization-api] Anyone been getting odd data presented the last few days?
Hi! This week I've had a few odd experiences with sites that have been around for a while. Firstly charts were taking an age to load under OSX (but fine under Windows) even though all filters had populated so data was available. It still seems sluggish now. However this big one for me is that I'm getting discrepancies in presented data at the moment. For example... With this dataset (which for the purposes of troubleshooting I have made visible by binding a table to it on the same page): http://i.imgur.com/dzFr1cx.png I am getting the following chart: http://i.imgur.com/pIASQCb.png Has anyone else been experiencing something similar? Thanks! Dan -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
[visualization-api] Re: Multiple charts from csv file on same page.
With the above you could change it like this: var columnoptions = { title: title, fontSize: 14, width: 400, height: 300 }; var pieoptions = { title: title, fontSize: 14, width: 400, height: 400 }; var opt; var chart; if (chartType == 'PieChart') { chart = new google.visualization.PieChart(document. getElementById(elementId)); opt = pieoptions; } else if (chartType == 'ColumnChart') { chart = new google.visualization.ColumnChart(document. getElementById(elementId)); opt = columnoptions; } else { // invalid chart type, throw error } chart.draw(data, opt); }); On Tuesday, 25 November 2014 22:50:59 UTC, paul bor wrote: Hi Andrew, I need your help once again. Right now I have 5 charts on my page and thanks to you they work perfect! However, I need to different options on each chart, but I have no idea how to do that. Can you please help me? Thanks, Paul On Wednesday, June 25, 2014 7:38:34 PM UTC-7, Andrew Gallant wrote: You can add a chart type parameter as well: function drawChart(){ drawChartFromCSV('data.csv', 'chart_div', 'Metrics 1', 'ColumnChart'); drawChartFromCSV('data1.csv', 'chart_div2', 'Metrics 2', 'PieChart'); drawChartFromCSV('data3.csv', 'chart_div3', 'Metrics 3', 'PieChart'); } function drawChartFromCSV(filename, elementId, title, chartType, verticalUnit){ $.get(filename, function(csvString) { var arrayData = $.csv.toArrays(csvString, {onParseValue: $.csv.hooks.castToScalar}); var data = new google.visualization.arrayToDataTable(arrayData); var view = new google.visualization.DataView(data); view.setColumns([0,1]); var options = { title: title, fontSize: 14, width: 400, height: 300 }; var chart; if (chartType == 'PieChart') { chart = new google.visualization.PieChart(document.getElementById(elementId)); } else if (chartType == 'ColumnChart') { chart = new google.visualization.ColumnChart(document.getElementById(elementId)); } else { // invalid chart type, throw error } chart.draw(data, options); }); } On Wednesday, June 25, 2014 6:50:50 PM UTC-4, paul bor wrote: Hi Andrew, Actually, I have a question, let’s say that I need 2 Pie charts and 1 Column chart. How do I do it? Thanks, Paul On Tuesday, June 24, 2014 6:18:39 PM UTC-7, Andrew Gallant wrote: Since your chart options are otherwise identical for each chart, would this work for you? function drawChart(){ drawChartFromCSV('data.csv', 'chart_div', 'Metrics 1'); drawChartFromCSV('data1.csv', 'chart_div2', 'Metrics 2'); drawChartFromCSV('data3.csv', 'chart_div3', 'Metrics 3'); } function drawChartFromCSV(filename, elementId, title, verticalUnit){ $.get(filename, function(csvString) { var arrayData = $.csv.toArrays(csvString, {onParseValue: $.csv.hooks.castToScalar}); var data = new google.visualization.arrayToDataTable(arrayData); var view = new google.visualization.DataView(data); view.setColumns([0,1]); var options = { title: title, fontSize: 14, width: 400, height: 300 }; var chart = new google.visualization.PieChart(document.getElementById(elementId)); chart.draw(data, options); }); } On Tuesday, June 24, 2014 7:52:49 PM UTC-4, paul bor wrote: Hi folks, I am trying to change the tittle in my charts, but I am not able. I got the data right, but I can't get the tittle right. Please help me. Here is what I have: script src=https://www.google.com/jsapi;/script script src=http://code.jquery.com/jquery-1.10.1.min.js;/script script src= https://jquery-csv.googlecode.com/files/jquery.csv-0.71.js;/script script google.load(visualization, 1, {packages:[corechart]}); google.setOnLoadCallback(drawChart); function drawChart(){ drawChartFromCSV(data.csv ,'chart_div'); drawChartFromCSV(data1.csv ,'chart_div2'); drawChartFromCSV(data3.csv ,'chart_div3'); } function drawChartFromCSV(filename, elementId, verticalUnit){ $.get(filename, function(csvString) { var arrayData = $.csv.toArrays(csvString, {onParseValue: $.csv.hooks.castToScalar}); var data = new google.visualization.arrayToDataTable(arrayData); var view = new google.visualization.DataView(data); view.setColumns([0,1]); var options = {'title':'Metrics 1', 'fontSize':14, 'width':400,
[visualization-api] Re: One table interacting with multiple charts
Hi! I'm afraid I won't be able to help that much, but you might want to keep an eye on this thread (https://groups.google.com/forum/#!topic/google-visualization-api/N8gkSO7iqYc) as I think thats what you're after. The map example you've linked isn't adjusting the data in the map once the table is clicked, just relocating the camera so to speak. The way that I would approach your problem would be to have a pie chart that shows the percent win/draw/lost across all the data in the table, and then when the table is clicked, use the selection that is made in the table to apply a filter to the underlying data. Although now thinking about it that might be easier than I thought (here goes, a bit of a brain dump so might get messy...) The map example is using this code to relocate the map: google.visualization.events.addListener(table, 'select', function() { map.setSelection(table.getSelection()); }); So what you could do is within the select listener for your table, grab your underlying dataset, apply a dataview to it with an appropriate filter, then set your piechart to the new dataset. So something like (this is pseudo code - it won't work!): var chart1 = new google.visualization.ChartWrapper({ 'chartType': 'PieChart', 'containerId': 'chart1_div', }); google.visualization.events.addListener(table, 'select', function() { var dt = table.getDataTable(); var chart1view = new google.visualization.DataView(dt); chart1view.setRows(dt.getFilteredRows({ column: 1, value: table. getSelection() })); chart1.setDataTable(chart1view); chart1.draw; }); In *theory* I think this method is sound - you might have to dig out some examples to get the code right. I've included that piechart code as I think you need to create the chart in a ChartWrapper for this to work. Its all probably a load of rubbish, but hope it helps a bit! On Wednesday, 26 November 2014 10:12:12 UTC, Bert Hollander wrote: Hi there, I've got quite a difficult question. For my local club, I have got one table with data (statistics) which I want to show per row. When clicking or hovering on each row, I would like a pie chart to show up next to it. For example in the Examples https://developers.google.com/chart/interactive/docs/examples#full_html_page_example, each row in the table is connected to the Google Map. Assuming this is part of the data: var Data = new google.visualization.DataTable(); Data.addColumn('string', 'Name'); Data.addColumn('string', 'Won'); Data.addColumn('string', 'Draw'); Data.addColumn('string', 'Lost'); Data.addRows([ ['Jan Jansen', '48', '32' ,'25'], ['Kees de Vries', '49', '28' ,'23'], ['Sem Smit', '41', '31' ,'35'] ]); ... I would like a pie chart (as in http://jsfiddle.net/qh5z4etw/) showing the percentages/number, when you hover/click over one of the rows in the table. Is this even possible, or should the data be in another shape? Thanks for any help in advance, Bert -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
Re: [visualization-api] Re: Using recordsets
Heres a sample web service - sorry for the VB.net... ;) Imports System.Web Imports System.Web.Services Imports System.Web.Services.Protocols Imports System.Data Imports System.Data.SqlClient Imports System.Web.Script.Services ' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. System.Web.Script.Services.ScriptService() _ WebService(Namespace:=http://tempuri.org/;) _ WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1) _ Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated() _ Public Class Lifecycle Inherits System.Web.Services.WebService WebMethod() _ ScriptMethod(UseHttpGet:=True, ResponseFormat:=ResponseFormat.Json) _ Public Function GetAllData() As String Dim myDT As DataTable = GetData(SELECT * FROM mySQLTable, mySQLTable) Return DataTableToJSON(myDT) End Function Private Function GetData(SQLCommand As String, TableName As String) As DataTable Dim myCMD As String = Dim conn As New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings(myConnectionString).ConnectionString) conn.Open() Dim myDA As New SqlDataAdapter(SQLCommand, conn) Dim dsData As New DataSet(TableName) dsData.EnforceConstraints = False myDA.FillSchema(dsData, SchemaType.Source, TableName) myDA.Fill(dsData, TableName) Dim tblDT As DataTable tblDT = dsData.Tables(TableName) conn.Close() Return tblDT End Function Private Function DataTableToJSON(myDT As DataTable) As String Dim serializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer() serializer.MaxJsonLength = Int32.MaxValue Dim rows As New List(Of Dictionary(Of String, Object)) Dim row As Dictionary(Of String, Object) For Each dr As DataRow In myDT.Rows row = New Dictionary(Of String, Object) For Each col As DataColumn In myDT.Columns row.Add(col.ColumnName, dr(col)) Next rows.Add(row) Next Return serializer.Serialize(rows) End Function End Class From your javascript setting up the Charts, its then simply a matter of calling this service to get the data function getAllData() { $.ajax({ type: 'GET', dataType: 'json', contentType: 'application/json', url: '/Services/Lifecycle.asmx/GetAllData', success: function (response) { setTable(response.d); } }); } function setTable(dataValues) { var result = JSON.parse(dataValues); var data = new google.visualization.DataTable(); data.addColumn('string', 'ColumnName'); data.addColumn('datetime', 'Start'); data.addColumn('datetime', 'End'); data.addColumn('string', 'ProductType'); data.addColumn('number', 'EndDateYear'); for (var i = 0; i result.length; i++) { data.addRow([ result[i].FullProduct, result[i].Event, new Date(result[i].StartDateYear, result[i].StartDateMonth - 1, result[i].StartDateDay), new Date(result[i].EndDateYear, result[i].EndDateMonth - 1, result[i].EndDateDay), result[i].ProductType, result[i].EndDateYear ]); } doCharts(data); } -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
Re: [visualization-api] Re: Using recordsets
Heres a sample web service - sorry for the VB.net... ;) Imports System.Web Imports System.Web.Services Imports System.Web.Services.Protocols Imports System.Data Imports System.Data.SqlClient Imports System.Web.Script.Services ' To allow this Web Service to be called from script, using ASP.NET http://asp.net/ AJAX, uncomment the following line. System.Web.Script.Services.ScriptService() _ WebService(Namespace:=http://tempuri.org/;) _ WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1) _ Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated() _ Public Class Lifecycle Inherits System.Web.Services.WebService WebMethod() _ ScriptMethod(UseHttpGet:=True, ResponseFormat:=ResponseFormat.Json) _ Public Function GetAllData() As String Dim myDT As DataTable = GetData(SELECT * FROM mySQLTable, mySQLTable) Return DataTableToJSON(myDT) End Function Private Function GetData(SQLCommand As String, TableName As String) As DataTable Dim myCMD As String = Dim conn As New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings(myConnectionString).ConnectionString) conn.Open() Dim myDA As New SqlDataAdapter(SQLCommand, conn) Dim dsData As New DataSet(TableName) dsData.EnforceConstraints = False myDA.FillSchema(dsData, SchemaType.Source, TableName) myDA.Fill(dsData, TableName) Dim tblDT As DataTable tblDT = dsData.Tables(TableName) conn.Close() Return tblDT End Function Private Function DataTableToJSON(myDT As DataTable) As String Dim serializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer() serializer.MaxJsonLength = Int32.MaxValue Dim rows As New List(Of Dictionary(Of String, Object)) Dim row As Dictionary(Of String, Object) For Each dr As DataRow In myDT.Rows row = New Dictionary(Of String, Object) For Each col As DataColumn In myDT.Columns row.Add(col.ColumnName, dr(col)) Next rows.Add(row) Next Return serializer.Serialize(rows) End Function End Class From your javascript setting up the Charts, its then simply a matter of calling this service to get the data function getAllData() { $.ajax({ type: 'GET', dataType: 'json', contentType: 'application/json', url: '/Services/Lifecycle.asmx/GetAllData', success: function (response) { setTable(response.d); } }); } function setTable(dataValues) { var result = JSON.parse(dataValues); var data = new google.visualization.DataTable(); data.addColumn('string', 'ColumnName'); data.addColumn('datetime', 'ColumnName2'); for (var i = 0; i result.length; i++) { data.addRow([ result[i].ColumnName, result[i].ColumnName2 ]); } doCharts(data); } Hope that makes sense - in the web service you can manipulate the data, do anything .Net to it you deem fit, that then gets translated into JSON and served on request to your javascript file. -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
Re: [visualization-api] Re: Using recordsets
I've been doing work with Google charts in ASP.Net. The easiest way I found was to create a web service (ASMX) that can gather and return the data which the charts then use. Not in the office at the mo but will post some code in a bit. Essentially the Web Service connects to SQL and creates a data table as normal, then returns it as a JSON string. Will try to post some code later. -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
[visualization-api] Excessive loading on dashboard page (18s)
Hi all hope someone can help. I'm using Google Charts to present a dashboard containing 5 charts and 5 tables. Each of these are driven from a single data source. To achieve this I have a 6th hidden 'proxy' table that 6 filters are attached to. Upon a filter event triggering the datatable in the proxy is read, and various dataviews and groups created and attached to the relevant charts. The original data is being obtained by a JSON query, which returns (currently) 6,200 rows. Upon first load of the page it is taking about 18 seconds to load, and once a filter has been *cleared *around 13 seconds. Attached is a screen of the Timeline dev tool - I'm currently working on sanitizing the code so I can share it, however I was wondering if someone might be able to give me some pointers. There seems to be a mass collection event occuring - am I doing too much on a single page? Should I split out the 'master' data in to smaller JSON requests for each chart? http://imgur.com/KbWFe5H Many thanks, Dan -- You received this message because you are subscribed to the Google Groups Google Visualization API group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.