[visualization-api] Re: Sending Queries from Google Apps Script

2024-09-16 Thread 'Ray Thomas' via Google Visualization API
Are you testing this locally or from a web server? If you're testing this locally unless something from the likes of https://medium.com/@dtkatz/3-ways-to-fix-the-cors-error-and-how-access-control-allow-origin-works-d97d55946d9 works for you, it is unlikely the charts will display. They should b

[visualization-api] Re: Google Sheet Query Language

2024-04-11 Thread 'Ray Thomas' via Google Visualization API
Hi Ale, I have no use-case for using CSVs at all. What happened was that years ago I was working for a university looking after their website. They wanted graphing capabilities for their sites but between them, Web Services and IT wouldn't provide the means of connecting to any of our databases

[visualization-api] Re: URL creation for extracting Google Sheets data

2024-04-10 Thread 'Ray Thomas' via Google Visualization API
I've had better luck using the query code from https://developers.google.com/chart/interactive/docs/spreadsheets and the encodeURIComponent function. For example: function drawChart() { var queryString = encodeURIComponent('SELECT C,A,E where E="Fun" ORDER BY C,A'); var query = new googl

[visualization-api] Re: URL creation for extracting Google Sheets data

2024-04-10 Thread 'Ray Thomas' via Google Visualization API
I've had better luck using the query code from https://developers.google.com/chart/interactive/docs/spreadsheets and the encodeURIComponent function. For example: I've had better luck using the query code from https://developers.google.com/chart/interactive/docs/spreadsheets and the encodeU

[visualization-api] Re: URL creation for extracting Google Sheets data

2024-04-10 Thread 'Ray Thomas' via Google Visualization API
I've had better luck using the query code from https://developers.google.com/chart/interactive/docs/spreadsheets and the encodeURIComponent function. For example: function drawChart() { var queryString = encodeURIComponent('SELECT C,A,E where E="Fun" ORDER BY C,A'); var query = new googl

[visualization-api] Re: Google Sheet Query Language

2024-04-10 Thread 'Ray Thomas' via Google Visualization API
I couldn't get your CSV file to work at all wthout making some changes to it, changing the commas to decimal points and the semicolons to commas. Even then, I couldn't get a query to work with it. I know the query works, because I used it in a Google Sheet

[visualization-api] Re: Google chart localy

2024-01-05 Thread 'Ray Thomas' via Google Visualization API
You can't. The API is free to use, even commercially, but it belongs to, and is hosted by Google and their TOS, https://developers.google.com/terms and https://support.google.com/code/topic/13605, means you cannot download it and host it locally. This may change in the future as they posted in

[visualization-api] Re: Google Charts not displaying in DIV

2023-12-15 Thread 'Ray Thomas' via Google Visualization API
What does the console message in the browser dev tools say? It might be something like "Error: The container #xx is not defined." The div to hold the chart has to exist before the chart can be drawn. On Thursday, December 14, 2023 at 8:48:33 AM UTC-5 Regain 2AControl wrote: > I have ju

Re: [visualization-api] JavaScript Template Strings

2023-11-21 Thread 'Ray Thomas' via Google Visualization API
rawChart function and ChartWrapper class do a lookup of the string > name of a chartType in order to interpret the string as a chart type that > can be executed. Doing that may require dynamically loading more packages, > if they are not already loaded. > > On Mon, Nov 20, 2023

[visualization-api] JavaScript Template Strings

2023-11-20 Thread 'Ray Thomas' via Google Visualization API
I thought I'd try using JavaScript's template strings to produce some charts, but cannot make them work. The idea was to pass a variable into the visualization chart code. The code I used was: function newCharts(){ chartType=`BarChart`; var chartStr = `google.visualization.${chartType}(document

[visualization-api] Re: Google Visualization API for google sheets limit and costing

2023-10-21 Thread 'Ray Thomas' via Google Visualization API
The API is free to use, but you cannot host it yourself whch sometimes gets asked about here. As for data limits, I don't think there are hard limits but performance will drop for very large data sets - tens of thousands of rows in the Google Chart, and they'll probably take a look at what you'r

Re: [visualization-api] How to id certain columns or header rows in Table API

2023-08-31 Thread 'Ray Thomas' via Google Visualization API
This may help you, you can manipulate the data to give any cell, row, or column you want a class using the Visualizations API using the setProperties methods on https://developers.google.com/chart/interactive/docs/reference#methods I wrote about how I do this with an example at https://brisray

[visualization-api] Re: I need to add the averages of the values to my chart of type "ChartAreas".

2023-05-05 Thread 'Ray Thomas' via Google Visualization API
The second bit is easier. I created copies of the CSV file and changed the year in them, now I had three files to test this on, jose-2022.csv, jose-2023.csv and jose-2024.csv. To get the current year in JavaScript use new Date().getFullYear(); Then it's just a matter of creating the new file na

[visualization-api] Re: I need to add the averages of the values to my chart of type "ChartAreas".

2023-05-05 Thread 'Ray Thomas' via Google Visualization API
You are getting the "b.getTimezoneOffset is not a function" error because the date in CSV file is in the wrong format. This is your original format: 01-01-2023,7.7,13.0,69,99 02-01-2023,6.5,12.1,67,98 03-01-2023,7.0,12.6,67,99 It should be: 2023-01-01,7.7,13,69,99 2023-01-02,6.5,12.1,67,98 2023

[visualization-api] Re: I need to add the averages of the values to my chart of type "ChartAreas".

2023-05-04 Thread 'Ray Thomas' via Google Visualization API
Aftere reading all the links I gave (several times), I finally worked this out. It confused me why so many tables seemed to be made. Here's the sequence of events: 1) Import the data into a datatable 2) Create a new table view with the grouping data and averages . As all the data is being used,

[visualization-api] Re: I need to add the averages of the values to my chart of type "ChartAreas".

2023-05-01 Thread 'Ray Thomas' via Google Visualization API
When CSV files are used by the API, it guesses the data type of each column. It's reading the number columns properly but I think it is importing the date as a string and so cannot graph it on a trendline. From https://developers.google.com/chart/interactive/docs/reference#google.visualization.

[visualization-api] Re: I need to add the averages of the values to my chart of type "ChartAreas".

2023-05-01 Thread 'Ray Thomas' via Google Visualization API
I used a LineChart because Trendlines only work on Scatter Charts, Bar Charts, Column Charts, and Line Charts. Sorry, I should have explained that in my answer. I also don't have PHP installed so what I did was use a query to open the CSV file after I rewrote the dates. The complete code I used

[visualization-api] Re: Google Charts with CSV file

2023-04-28 Thread 'Ray Thomas' via Google Visualization API
You're too kind Joe. Once I realized what you are supposed to do with the query language it was surprisingly easy to create the chart. I let myself get a bit confused by some of what I found on Stack Overflow at first, such as posts using external libraries to import the data, which aren't neede

[visualization-api] Re: Google Charts with CSV file

2023-04-27 Thread 'Ray Thomas' via Google Visualization API
It took a little bit of finding but I got the basics from a 9-year old thread in this group. You have to use a query to get the data from the CSV file. Here's the code using your CSV file - i named it mycsv.csv // Load the Charts and the corechart package. google.charts.load('current', {'packa

[visualization-api] Re: Cannot get PieChart to update data after button click

2023-04-27 Thread 'Ray Thomas' via Google Visualization API
Hello Arthur, I couldn't figure out why your code wasn't working so I started over. Two ways of doing this came to mind, one way is to draw the charts then use a button to toggle the display property of the divs on and off. The other way was to redraw the charts on a button click in a single di

[visualization-api] Re: TIMEline Charts API Zero shows up as JAN in tool tips.. and so on.

2023-04-25 Thread 'Ray Thomas' via Google Visualization API
Hi Rajesh, It is to do with how JavaScript counts months, they start from 0 not 1, and run from 0 (January) to 11 (December). It does it with days of the week as well, the first day of the week is 0 and run from 0 (Sunday) to 6 ( Saturday). Ray On Monday, April 24, 2023 at 11:14:42 AM UTC-4 Ra

Re: [visualization-api] Re: Dynamic Swap Y-Axis Values in same Scatter Chart

2023-04-04 Thread 'Ray Thomas' via Google Visualization API
ou, that seems like what I'm after in terms of pull down selector. > My data table has x values and several y values already in there, and I > want to swap out y values to make a "new" scatter chart. > > On Fri, Mar 31, 2023 at 12:10 PM 'Ray Thomas' via Google Vis

[visualization-api] Re: Dynamic Swap Y-Axis Values in same Scatter Chart

2023-03-31 Thread 'Ray Thomas' via Google Visualization API
This is fairly easy to do, but you are going to have to change the type of chart you are drawing. This is because scatter charts do not support the isStacked option which allows you to use the percent stacked display. It's just not in the list of scatter chart options - https://developers.googl

Re: [visualization-api] Re: How to have the Y axis labels show both Celsius and Fahrenheit in a line chart

2022-12-20 Thread 'Ray Thomas' via Google Visualization API
PM UTC-5 Ray Thomas wrote: > Thanks Daniel, > > I've just been reading this > https://github.com/google/google-visualization-issues/issues/1769 about > this very thing. > > > > On Sunday, December 18, 2022 at 6:34:49 PM UTC-5 dlali...@google.com > wrote: >

Re: [visualization-api] Re: How to have the Y axis labels show both Celsius and Fahrenheit in a line chart

2022-12-18 Thread 'Ray Thomas' via Google Visualization API
so that > it matches the min and max extreme values of the other axis. It's also > useful to specify the axis tick values you want to see using the ticks > option. > > I did this using Ray's code. See > https://jsfiddle.net/dlaliberte/91wef0ga/14/ > > > On Su

[visualization-api] Re: How to have the Y axis labels show both Celsius and Fahrenheit in a line chart

2022-12-18 Thread 'Ray Thomas' via Google Visualization API
It doesn't work properly! I used // Load Charts and the corechart package. google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var queryString = encodeURIComponent('SELECT A,B ORDER BY A'); v

[visualization-api] Re: How to have the Y axis labels show both Celsius and Fahrenheit in a line chart

2022-12-18 Thread 'Ray Thomas' via Google Visualization API
This does not work as I thought it might. I used: // Load Charts and the corechart and barchart packages. google.charts.load('current', {'packages':['corechart']}); // Draw the pie chart and bar chart when Charts is loaded. google.charts.setOnLoadCallback(drawChart);

[visualization-api] Re: How to have the Y axis labels show both Celsius and Fahrenheit in a line chart

2022-12-16 Thread 'Ray Thomas' via Google Visualization API
I don't think you can do exactly what you want to do because the scale and grid markers are calculated by the API. But what you could do is add a calculated column either in the original data or create it before the API processes the data, that contains the fahrenheit values and display that on

Re: [visualization-api] Queries giving error only on Mobile Devices

2022-12-12 Thread 'Ray Thomas' via Google Visualization API
As far as I know, the best solution that works is to just use one ID. But, https://developers.google.com/apps-script/guides/projects also has this: - Open an incognito window in Google Chrome, or an equivalent private browsing window, and log in to the Google Account that has the Apps Scr

Re: [visualization-api] Queries giving error only on Mobile Devices

2022-12-07 Thread 'Ray Thomas' via Google Visualization API
It works properly on my Android as well. I have seen error messages like this on phones before, but that was years ago. Some devices never could display anything made with the API. If everything is the same, I don't see why it should work one day and not the next. Google Scripts does this some

Re: [visualization-api] Queries giving error only on Mobile Devices

2022-12-07 Thread 'Ray Thomas' via Google Visualization API
It works properly on a Samsung S9,+, but I have seen error messages like this on phones before, but that was years ago. Some devices never could display anything made with the API. Here's what I wrote about this in these forums in 2019: "I never managed to view the charts on my old Samsung Gala

[visualization-api] Re: Try to make a table interact with bar chart

2022-04-10 Thread 'Ray Thomas' via Google Visualization API
I can't produce a code example at the moment, there's just not enough time for eerything, but here's some thoughts that may help. The data sources have to have something in common. It could be a common data field in which case you can step through the data and look for the data, or they need to

[visualization-api] Re: Try to make a table interact with bar chart

2022-04-10 Thread 'Ray Thomas' via Google Visualization API
I can't produce a code example at the moment, there's just not enough time for eerything, but here's some thoughts that may help. The data sources have to have something in common. It could be a common data field in which case you can step through the data and look for the data, or they need to

[visualization-api] Re: Gannt Chart - Tooltip Bug or Issue

2022-02-19 Thread 'Ray Thomas' via Google Visualization API
The CSS nth-child() pseudo class can be incredibly useful - https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-child There's a lot of things CSS can do that I never realized it could. I'll never use most of what Chris Coyier writes about on CSS Tricks - https://css-tricks.com/ but it's alw

[visualization-api] Re: Gannt Chart - Tooltip Bug or Issue

2022-02-19 Thread 'Ray Thomas' via Google Visualization API
One option is to use a Timeline chart instead of a Gantt. I also found this page - https://matthewelsom.com/blog/styling-google-gantt-chart-with-css.html and Matthew does control the Gantt tooltips with CSS. I went to his CodePen and tried a few things. In his CSS tooltips section you can repl

[visualization-api] Re: Line in charts graphic bars

2022-02-19 Thread 'Ray Thomas' via Google Visualization API
Are you talking about the chart gridlines? Those can be defined in the chart options and can be applied to most charts. You need to look at what the various charts are capable of in the "Configuration options" (right-hand menu) of whatever type of chart you are using in the left-menu of https

[visualization-api] Re: thoughts on visualizing time data

2022-02-05 Thread 'Ray Thomas' via Google Visualization API
Hello Terry, I've used the API for several years now on various sites and found it ideal for what I use it for. The charts can be manipulated using CSS and JavaScript and my only worries about using it is that it doesn't seem as popular as it was and Google has a nasty habit of either making th

[visualization-api] Re: CSS Styling

2022-01-29 Thread 'Ray Thomas' via Google Visualization API
In case you haven't found it yet and it might help someone else, you need to read https://developers.google.com/chart/interactive/docs/gallery/table?hl=en#configuration-options There are three parts to getting CSS styles to work in tables. 1) Set the HTML and CSS in options 2) Define the class

[visualization-api] Re: date an time / line diagram

2022-01-29 Thread 'Ray Thomas' via Google Visualization API
Did you ever figure this out? Sometimes the documentation doesn't appear very clear to me but there seems to be several ways you can do this. 1) Add a column to the data before it gets imported You can create a new column and add information to that calculated from the other columns. An advan

[visualization-api] Re: Making Columns in column graphs clickable

2022-01-28 Thread 'Ray Thomas' via Google Visualization API
Yes there is. It's not very well documented, if at all - I couldn't find it. But looking through the documentation for getSelection() at https://developers.google.com/chart/interactive/docs/reference#visgetselection I thought I saw a way this could be done. The URLs can come from the data or f

[visualization-api] Re: Gantt chart taking very long to render

2021-09-10 Thread 'Ray Thomas' via Google Visualization API
Here's what I found in a couple of browsers: Chrome 93.0.4577.63 - runs everything fine Edge 93.0.961.44 - runs everything fine Firefox 91.0.1 - seems a little bit slower rendering the JSFiddle but otherwise OK Opera 78.0.4093.184 - seems slower than Firefox at rendering the JSFiddle, slow a

[visualization-api] Re: Adding the £ symbol to the tooltip

2021-08-08 Thread 'Ray Thomas' via Google Visualization API
How this works is going to depend on what your data looks like when you import it. Is it a simple value or has it already been formatted in some way? Google Charts data tables, like most spreadsheets, can hold two values, the actual underlying value and the formatted value. The dataTable has se

[visualization-api] Re: Get change in percentage between two points. Google Charts

2021-08-07 Thread 'Ray Thomas' via Google Visualization API
One way might be to show the change in a tooltip. Tooltips can show whatever you like - https://developers.google.com/chart/interactive/docs/customizing_tooltip_content - but it does mean creating a new column to show it. There's no reason you cannot show the current premium, percentage change

Re: [visualization-api] Formatting X axes values in tooltips

2021-05-02 Thread 'Ray Thomas' via Google Visualization API
Hello Shweta, You really can put whatever you like in the datatable cell used to create the tooltip so long as it's HTML formatted for JavaScript. You can include variables, images, links and even other charts - https://developers.google.com/chart/interactive/docs/customizing_tooltip_content

Re: [visualization-api] heatmap

2021-04-25 Thread 'Ray Thomas' via Google Visualization API
Given the image looks more like a table and that you can give every cell in a table a CSS class here's something I would try. It looks good in theory and should work. The example at https://developers.google.com/chart/interactive/docs/examples#custom_table_example gets the classname for the c

[visualization-api] Re: Graph and while

2021-03-19 Thread 'Ray Thomas' via Google Visualization API
Hi Jean-Yves, Problems with drawing multiple charts on a page comes up regularly, and it's usually because of the way scripts work. To show all the charts, you need to either wait until each chart fires its ready event - https://developers.google.com/chart/interactive/docs/events#the-ready-ev

[visualization-api] Re: Google Visualization API Sample

2021-03-19 Thread 'Ray Thomas' via Google Visualization API
Hi Culley, I think it's the authorization key causing this. You'll need to read https://developers.google.com/chart/interactive/docs/spreadsheets#authorization which explains how to obtain your own OAuth credentials. My own preference is to simply make the spreadsheet readable to anyone with t

[visualization-api] Re: Study project data visualisation graphics webpage doesn't work

2021-03-13 Thread 'Ray Thomas' via Google Visualization API
Are you getting any sort of error message in the console? F12 in most browsers and Ctrl+Shift+I in Opera. I can't say for certain but it might be the lines async: false. That's been depreciated - https://xhr.spec.whatwg.org/#the-open()-method and https://developer.mozilla.org/en-US/docs/Web/API

[visualization-api] Re: Adding a second curve to a graph

2021-03-07 Thread 'Ray Thomas' via Google Visualization API
There isn't a missing or extra comma in the CSV file? Someone else here had that problem. Absolutely nothing wrong with their code but there was an extra comma hundreds of lines into their data file which meant the chart couldn't draw. On Sunday, March 7, 2021 at 5:24:32 PM UTC-5 Ray Thomas wr

[visualization-api] Re: Adding a second curve to a graph

2021-03-07 Thread 'Ray Thomas' via Google Visualization API
I can't see anything wrong with it - but that doesn't mean much. Are you getting any console messages? (F12 in most browsers, Opera uses Ctrl + Shift + i) If you remove the viewport code do the graphs display? If it's something to do with that, perhaps enabling explorer in options - https://de

Re: [visualization-api] Re: Challenges with the Select event or getSelection method?

2021-03-07 Thread 'Ray Thomas' via Google Visualization API
Did you ever get this working Jamie? Being able to natively get the cell or column references would be useful, but as they are not, what I did was add a unique class name to each cell, then use an eventListener, then used the results of that to get the row and column numbers back out of the uni

[visualization-api] Re: setting column width

2021-03-06 Thread 'Ray Thomas' via Google Visualization API
What I came up could probably be simplified. It seems a lot of work to extract the row and column numbers from the class names I gave to the cells. var longText = (function() { google.charts.load('current', {'packages':['table']}); google.charts.setOnLoadCallback(drawChart); functio

[visualization-api] Re: setting column width

2021-03-06 Thread 'Ray Thomas' via Google Visualization API
What I came up could probably be simplified. There seems to be a lot of code getting the row and column information back out of the class names I gave to the cells. var longText = (function() { google.charts.load('current', {'packages':['table']}); google.charts.setOnLoadCallback(drawCh

[visualization-api] Re: setting column width

2021-03-05 Thread 'Ray Thomas' via Google Visualization API
Tooltips are not natively supported by table charts - https://developers.google.com/chart/interactive/docs/customizing_tooltip_content#supported-charts I thought about this when writing the table and someone wants me to try and do it in a project for work that they've been waiting ages for. The

[visualization-api] Re: setting column width

2021-03-04 Thread 'Ray Thomas' via Google Visualization API
Hi What you need to do is step through the datatable, test the length of the text in each cell, then change it if necessary. Here's an example: var longText = (function() { google.charts.load('current', {'packages':['table']}); google.charts.setOnLoadCallback(drawChart); funct

[visualization-api] Re: Visualization from not shared google spreadsheet

2021-03-04 Thread 'Ray Thomas' via Google Visualization API
You can use OAuth 2.0 authorization - https://developers.google.com/chart/interactive/docs/spreadsheets#authorization On Thursday, March 4, 2021 at 2:10:16 PM UTC-5 njuha...@gmail.com wrote: > Hello, > > I was searching a lot in google, bud did not find something working. > I am using vizuali

[visualization-api] Re: google.visualization.drawChart JSON response object options?

2021-01-24 Thread 'Ray Thomas' via Google Visualization API
It should be possible. You can turn both option objects into strings and manipulate them that way using JSON.stringify() to create a single set of options. // Set chart options var options = {'title':'How Much Pizza I Ate Last Night', 'width':400, 'height':300}; myStr = JSON.stringify(options);

[visualization-api] Re: Different color pattern

2020-07-18 Thread 'Ray Thomas' via Google Visualization API
You need to give an array of color in the options for each chart. That's explained on https://developers.google.com/chart/interactive/docs/customizing_charts What happens is the same as for the default palette, if you have more data than you have defined colors for then they start again at the

[visualization-api] Re: Creating charts from an external Spreadsheet and update data every hour/day(or at a particular time)

2020-04-07 Thread 'Ray Thomas' via Google Visualization API
First, do you mean a Google Sheet or Excel? Google Sheets are much easier to work with and the charts will update as soon as the sheet is, and the web page refreshed. Excel is going to need a bit more help to work properly and there's very little help around for doing it. There's some at the f

[visualization-api] Re: Comparing data from two years

2020-01-23 Thread 'Ray Thomas' via Google Visualization API
Hello Lee, What you could do is put the values side by side in almost any of the chart types, but there is also something called a Diff Chart that is good for comparing data - https://developers.google.com/chart/interactive/docs/gallery/diffchart This came up here just a few days ago, so take

[visualization-api] Re: adding horizontal,vertical labels to a histogram chart

2019-12-06 Thread 'Ray Thomas' via Google Visualization API
Hello again Yves, You can add new lines to titles and labels by using \n in the text. BUT - you cannot (as far as I know) easily restyle it. What I did was copy your code and put it at http://brisray.com/test/yves.htm so I could see what I can do to help you. I also tidied up what I wrote befor

Re: [visualization-api] Subdivide a pie chart section

2019-11-27 Thread 'Ray Thomas' via Google Visualization API
An idea I had when I first read this is to create a custom tooltip for that slice of the pie chart to explain or display the information, even another pie chart, for that slice - https://developers.google.com/chart/interactive/docs/customizing_tooltip_content According to Stackoverflow, if you

Re: [visualization-api] Re: adding horizontal,vertical labels to a histogram chart

2019-11-27 Thread 'Ray Thomas' via Google Visualization API
Because this is going to be under all the chart elements, I'd be tempted to go back to plain HTML/CSS. Something like this. This is the left-hand description This is the right-hand description -- You received this message because you are subscribed to the Google Groups "Google Vi

Re: [visualization-api] Re: adding horizontal,vertical labels to a histogram chart

2019-11-27 Thread 'Ray Thomas' via Google Visualization API
Because this is going to under the chart anyway, I'd be tempted to go back to plain HTML/CSS Something like this: This is the left-hand description This is the right-hand description -- You received this message because you are subscribed to the Google Groups "Google Visualizati

[visualization-api] Re: adding horizontal,vertical labels to a histogram chart

2019-11-27 Thread 'Ray Thomas' via Google Visualization API
Cool. These charts really are versatile, but sometimes it's a little bit of work to get them how you want them. Ray -- 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, s

[visualization-api] Re: adding horizontal,vertical labels to a histogram chart

2019-11-26 Thread 'Ray Thomas' via Google Visualization API
Hello Yves, what you want is var options = { title: 'Efficiency of East Bank Buildings', legend: { position: 'none' }, colors: ['gold'], histogram: { hideBucketItems: true }, hAxis: { title: 'Efficiency (Energy-use intensity/Energy-use per squar

[visualization-api] Re: Vertical Line Graph Issue

2019-11-19 Thread 'Ray Thomas' via Google Visualization API
I don't know if this is going to work for you but sometimes the way to get the graph to display how you want it to is not to flip the data but to rotate the datatable created from the data. This was written several years ago by Bhuman Soni - http://captaindanko.blogspot.com/2013/05/transpose-of

[visualization-api] Re: Why are my posts being deleted?

2019-11-19 Thread 'Ray Thomas' via Google Visualization API
I've had a couple of replies automatically deleted a couple of minutes ago. -- 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+

Re: [visualization-api] Re: Histogram: How to make it so that my columns are not divided individually?

2019-11-19 Thread 'Ray Thomas' via Google Visualization API
It all works but the documentation is a little difficult to understand in places. There's another way of drawing the graphs and that uses an object called ChartWrapper - https://developers.google.com/chart/interactive/docs/reference#chartwrapperobject In that, you can set the options using d

[visualization-api] Re: Histogram: How to make it so that my columns are not divided individually?

2019-11-18 Thread 'Ray Thomas' via Google Visualization API
You can hide the individual column elements by setting the histogram.hideBucketItems option to true. In your options, use histogram: { hideBucketItems: true }, For the titles and and legends you need to go to https://developers.google.com/chart/interactive/docs/gallery/histogram#configurat

[visualization-api] Re: Histogram: defining my data?

2019-11-17 Thread 'Ray Thomas' via Google Visualization API
Hi Yves, I think I know what's wrong. In the data you sent me, in the line ['Akerman Hall' 106.7], there's a comma missing, change it to ['Akerman Hall', 106.7], and it should all work. Ray -- You received this message because you are subscribed to the Google Groups "Google Visualization API

[visualization-api] Re: skip 0's and negative values from chart

2019-11-17 Thread 'Ray Thomas' via Google Visualization API
Try putting nulls or leaving the data out altogether where zero and negative values are and setting interpolateNulls to true. You should end up with something looking like this: var data = google.visualization.arrayToDataTable([ ['Year', 'Massachusetts', 'National'], ['2010', 88,

[visualization-api] Re: skip 0's and negative values from chart

2019-11-17 Thread 'Ray Thomas' via Google Visualization API
Try putting nulls where zero and negative values are and setting interpolateNulls to true. You should end up with something looking like this: var data = google.visualization.arrayToDataTable([ ['Year', 'Massachusetts', 'National'], ['2010', 88, 76], ['2011', null, 82

[visualization-api] Re: Histogram: defining my data?

2019-11-17 Thread 'Ray Thomas' via Google Visualization API
You can easily check most of the examples as they're usually in their own frames. Right click somewhere just outside of the graph and choose to view the frame source, copy it to Notepad or other plain text editor, remove the information in the section, and save it to a new html file. You can t

[visualization-api] Re: Identifying the clicked element in a select handler

2019-09-08 Thread 'Ray Thomas' via Google Visualization API
Maybe this can help - https://stackoverflow.com/questions/46225912/how-do-i-get-the-information-about-the-selected-bar-in-the-google-charts In that example, when the bar is clicked, the data row number it belongs to is determined and the information extracted from the data table for that row.

[visualization-api] Re: How to get a count of words appearing in a column of text fields, sorted by volume

2019-09-08 Thread 'Ray Thomas' via Google Visualization API
The quickest way I know how to do this is with a query.. Suppose you have your list of words in column A. In cell B2 you can use =query(A2:A,"select A, count(A) where A != '' group by A order by count(A) desc") That adds two new columns, a list with the unique words and in the next column the

[visualization-api] Re: JavaScript code to dynamically switch between isStacked: true and isStacked: 'percent'

2019-08-23 Thread 'Ray Thomas' via Google Visualization API
This comes up every now and then such as https://stackoverflow.com/questions/21170147/google-charts-switching-between-line-and-column-charts and https://stackoverflow.com/questions/35380994/google-charts-switch-between-table-and-chart-view As you're only changing the value of isStacked you ne

[visualization-api] Re: how to add attach hyperlinks to google chart

2019-08-19 Thread 'Ray Thomas' via Google Visualization API
Here's how I do it, I'm not sure if it is the most efficient method, but it works in at least Table Charts. I create a column that contains the text I want to show and another that contains the URL i want the text to link to. You can see that in https://docs.google.com/spreadsheets/d/1kjOTQMAlW

[visualization-api] Re: SIMPLE DATE QUERY

2019-07-14 Thread 'Ray Thomas' via Google Visualization API
A little extra, suppose your cell B1 really does contain '=5 or < 7 or something of that sort, then you can use =QUERY(A:A, "select * where Month(A) "&B1&"") I made a small Sheet of the examples I used at https://docs.google.com/spreadsheets/d/1NTGuA7DA5-GVGbvT-aEYMIYmEl358NUjxExDFDVDq-8/edit#g

[visualization-api] Re: SIMPLE DATE QUERY

2019-07-14 Thread &#x27;Ray Thomas&#x27; via Google Visualization API
OK, suppose your column A contains the dates and cell B1 contains the number of the month you want, then you can use =QUERY(A:A, "select * where Month(A)="&B1&"") It looks a bit strange but that's the way the cell values are referenced in the queries. As a side note, if you use a query like t

[visualization-api] Re: Query Function

2019-07-13 Thread &#x27;Ray Thomas&#x27; via Google Visualization API
An old thread but this should work =Query(range,"Select C, sum(E) where C contains 'LIM67' and not C contains '+' group by C") -- 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

[visualization-api] Re: Timeline min/max viewable range

2019-07-13 Thread &#x27;Ray Thomas&#x27; via Google Visualization API
This thread is over a year old but I recently came across the same problem and eventually got it to work the way I wanted. What I had was a list of people and their start and end dates of working the the university college I work for. What I wanted was to show everyone who worked between user s

[visualization-api] Re: SIMPLE DATE QUERY

2019-07-13 Thread &#x27;Ray Thomas&#x27; via Google Visualization API
Try =QUERY(A:A, "select * where Month(A) = 5") Where A is the column of dates. In lots of instances months and days start from 0, not 1. So 5 would return those dates in June, 6 would return the dates in July. Sheet, column A 06/29/2019 06/29/2019 06/30/2019 07/01/2019 07/01/2019 07/02/2019 O

[visualization-api] Re: [Google Timeline] How to compress hAxis data with time(minutes) in Google Timeline?

2019-07-13 Thread &#x27;Ray Thomas&#x27; via Google Visualization API
I don't think there is. The Timelines are largely automatic without the number of options available in some other charts. I tried a couple of methods but the closest I came to what I think you want was by adding a 1 second event to the end of the day using [ 'Petunia Room', '', new Date(0,0,0,2

[visualization-api] Re: Stacked Bar Chart

2019-07-07 Thread &#x27;Ray Thomas&#x27; via Google Visualization API
Because Google Visualizations and Google Sheets both use Query language - https://developers.google.com/chart/interactive/docs/querylanguage - you can either extract the data you use in the Sheet or do it in the code when drawing the chart. I used your Sheet and used a query in the chart code

[visualization-api] Re: Repeated Y-Axis Labels on Stacked Material Chart

2019-06-10 Thread &#x27;Ray Thomas&#x27; via Google Visualization API
Hi Drew, I did wonder about that when I saw the graph but I can't recall seeing an example of showing such disparate values properly on the same chart. If it is not possible, there are two methods that may work. Some charts allow use of the "explorer" option. This allows users to zoom in on a

[visualization-api] Re: Repeated Y-Axis Labels on Stacked Material Chart

2019-06-08 Thread &#x27;Ray Thomas&#x27; via Google Visualization API
It's odd behavior to show the y-axis like that but one way around it is to set the font size to 0 for those axis. Another method I've seen used is to set the font color to match the background, but I think setting the font size to 0 is the better of the two. 2: { tex

[visualization-api] Re: Timeline - How to Control Width of Row Label.

2019-06-07 Thread &#x27;Ray Thomas&#x27; via Google Visualization API
I don't think there is. The column is "dumb" in that everything, HTML, escape codes, character codes and so on, are all treated as text, so there's no way to control it. Requests to change this behavior have been made for years before this thread was started, for example on GitHub - https://gi

[visualization-api] Re: Timeline Error

2019-06-02 Thread &#x27;Ray Thomas&#x27; via Google Visualization API
It's probably because your end time Mon Jul 01 2019 00:15:00 is earlier than your start time Mon Jul 01 2019 22:25:00 > -- 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

[visualization-api] Re: Timeline chart tooltips.

2019-06-01 Thread &#x27;Ray Thomas&#x27; via Google Visualization API
Until I can find a better method, what I did was to step through the datatable and create a new one with the columns set up in the tooltips help of the Timeline page - https://developers.google.com/chart/interactive/docs/gallery/timeline#customizing-tooltips. Now I know what I am doing I shoul

[visualization-api] Re: Timeline chart tooltips.

2019-06-01 Thread &#x27;Ray Thomas&#x27; via Google Visualization API
Until I can find a better method, what I did was to step through the datatable and create a new one with the columns set up in the tooltips help of the Timeline page - https://developers.google.com/chart/interactive/docs/gallery/timeline#customizing-tooltips. Now I know what I am doing I shoul

[visualization-api] Timeline chart tooltips.

2019-05-30 Thread &#x27;Ray Thomas&#x27; via Google Visualization API
A timeline I created just lists a set of employees, when they they started, when they finished, and their length of service. I don't know the exact dates they started, so just want to use the years - not month and day. The best way to show that seems to be a custom tooltip. The Google Sheet the

[visualization-api] Re: How to make a table with Google Sheets data using Google Charts API

2019-04-18 Thread &#x27;Ray Thomas&#x27; via Google Visualization API
An easier way to do what you want to do is to use the examples on https://developers.google.com/chart/interactive/docs/spreadsheets and https://developers.google.com/chart/interactive/docs/gallery/table Using the examples you can see you have to load the table package by using google.charts.lo

[visualization-api] Re: Color?

2019-04-13 Thread &#x27;Ray Thomas&#x27; via Google Visualization API
Andrian is absolutely correct but here's a fuller explanation. The colors can be defined for any graph either in the Options section or in the main draw() method. The help for both is at https://developers.google.com/chart/interactive/docs/customizing_charts The default color array for Google c

[visualization-api] Re: NOOB - where to get started

2019-03-23 Thread &#x27;Ray Thomas&#x27; via Google Visualization API
Using a Google Sheet with Google Visualizations is relatively easy. The documentation you need is at https://developers.google.com/chart/interactive/docs/spreadsheets#creating-a-chart-from-a-separate-spreadsheet all the other options in the documentation will work, just where the data comes fr

[visualization-api] Re: How to link the info from texboxes to the google chart (bars)

2019-02-09 Thread &#x27;Ray Thomas&#x27; via Google Visualization API
I'm not sure if this helps you specifically, but I can think of two ways text boxes can be linked to Google Charts. Because of the way some of the sites I use are set up, some are CMSs which I have only limited access to, so I mostly use Google Sheets to hold the data, but the principles should

[visualization-api] Re: Invert rows with columns on DataTable

2019-01-30 Thread &#x27;Ray Thomas&#x27; via Google Visualization API
As far as I know, the easiest way to do it is to the use the code from https://stackoverflow.com/questions/16949993/inverting-rows-and-columns-on-google-area-chart which in rturn comes from Bhuman's code at http://captaindanko.blogspot.com/2013/05/transpose-of-google-visualization-data.html Th

[visualization-api] Re: can I get help rearranging the columns in a google chart?

2019-01-19 Thread &#x27;Ray Thomas&#x27; via Google Visualization API
Are you using a Google Sheet to hold the chart? If you are you can use ORDER BY in the query to get the table. The help for that is at https://developers.google.com/chart/interactive/docs/querylanguage#order-by there's more at https://developers.google.com/chart/interactive/docs/spreadsheets a

[visualization-api] Re: LINK GOOGLE SHEET DATA TO LINE CHART -

2018-11-29 Thread &#x27;Ray Thomas&#x27; via Google Visualization API
As most of what you need is in your index.html file anyway it may be an idea to remove the GS code altogether, or at least the getSpreadsheetData() function and use the API's query to connect to and get the data from the spreadsheet. There's a complete example at https://developers.google.com/c

[visualization-api] Re: Eleminate RED color in Google Stacked bar charts

2018-10-01 Thread &#x27;Ray Thomas&#x27; via Google Visualization API
One way is to use the method described at https://developers.google.com/chart/interactive/docs/customizing_charts and to create your own palette in the graph's options. Google's default palette is at https://github.com/ankane/chartkick/issues/351, you can simply paste the values into the option

  1   2   >