Re: [visualization-api] Re: Tooltip role in a ArrayToDataTable.

2015-02-05 Thread Tong Sun
On Thu, Feb 5, 2015 at 11:10 AM, 'Sergey Grabkovsky' via Google Visualization API wrote: > Here's a jsfiddle: http://jsfiddle.net/ovxLjqyn/ > Perfect! much simpler than I thought. Thanks! -- You received this message because you are subscribed to the Google Groups "Google Visualization API" g

Re: [visualization-api] Re: Tooltip role in a ArrayToDataTable.

2015-02-05 Thread 'Sergey Grabkovsky' via Google Visualization API
Here's a jsfiddle: http://jsfiddle.net/ovxLjqyn/ On Thu Feb 05 2015 at 11:01:58 AM Tong Sun wrote: > Thanks. I've altered my starter code to use the CoreCharts instead: > > > ``` > > > > https://www.google.com/jsapi > "> > > // Load the Visualization API > google.lo

Re: [visualization-api] Re: Tooltip role in a ArrayToDataTable.

2015-02-05 Thread Tong Sun
Thanks. I've altered my starter code to use the CoreCharts instead: ``` https://www.google.com/jsapi "> // Load the Visualization API google.load("visualization", '1.1', {packages:['corechart']}); google.setOnLoadCallback(drawStuff); function drawStuff()

Re: [visualization-api] Re: Tooltip role in a ArrayToDataTable.

2015-02-05 Thread 'Sergey Grabkovsky' via Google Visualization API
Hi Tong, Custom tooltips are not yet supported for the Material Charts. If you want this feature, you should use the CoreCharts. On Thu Feb 05 2015 at 10:31:48 AM Tong Sun wrote: > > > On Thursday, February 5, 2015 at 12:21:03 AM UTC-5, Tong Sun wrote: >> >> >> >> On Sunday, November 17, 2013 a

Re: [visualization-api] Re: Tooltip role in a ArrayToDataTable.

2015-02-05 Thread Tong Sun
On Thursday, February 5, 2015 at 12:21:03 AM UTC-5, Tong Sun wrote: > > > > On Sunday, November 17, 2013 at 11:21:25 PM UTC-5, asgallant wrote: >> >> If you want custom tooltips to apply to all columns, you will need to do >> one of two things: either add a tooltip column after every data column

Re: [visualization-api] Re: Tooltip role in a ArrayToDataTable.

2015-02-04 Thread Tong Sun
On Sunday, November 17, 2013 at 11:21:25 PM UTC-5, asgallant wrote: > > If you want custom tooltips to apply to all columns, you will need to do > one of two things: either add a tooltip column after every data column you > want a custom tooltip for, or use a DataView to create custom tooltip

Re: [visualization-api] Re: Tooltip role in a ArrayToDataTable.

2013-11-18 Thread Sandy
hmm.. i had total misunderstanding of tool tip. Thanks for your help. On Mon, Nov 18, 2013 at 9:51 AM, asgallant wrote: > Ahh, I see that now; sorry, I should have looked closer. The tooltip role > column is working properly: the problem is that the data in column 12 > ("Dec") is 0 for both row

Re: [visualization-api] Re: Tooltip role in a ArrayToDataTable.

2013-11-17 Thread asgallant
Ahh, I see that now; sorry, I should have looked closer. The tooltip role column is working properly: the problem is that the data in column 12 ("Dec") is 0 for both rows, so the is no column to trigger the tooltip (if you put values in for "Dec" you will see the tooltips). If you want custom

Re: [visualization-api] Re: Tooltip role in a ArrayToDataTable.

2013-11-17 Thread Sandy
Hi, It's actually a column chart...I used piechart2 as just variable name. On Monday, November 18, 2013, asgallant wrote: > Your data is not structured correctly for a PieChart. The PieCharts > expect two columns of data: one "string" type (for the slice labels) and > one "number" type (for the

[visualization-api] Re: Tooltip role in a ArrayToDataTable.

2013-11-17 Thread asgallant
Your data is not structured correctly for a PieChart. The PieCharts expect two columns of data: one "string" type (for the slice labels) and one "number" type (for the slice values). Also, the PieCharts do not support the "tooltip" column role. On Sunday, November 17, 2013 1:25:05 PM UTC-5, S

[visualization-api] Re: Tooltip role in a ArrayToDataTable.

2013-11-17 Thread Sandeep Ambekar
Hi, I tried this.. but it didnt work.. here is how my script looks. var SRdata = google.visualization.arrayToDataTable([ ['Manager', 'JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC','hint'], ['ABC',0,0,0,0,0,0,0,8,1,0,0,0,'XYZ'], ['EFG',1479,1288,1348,1374,1589,1420,1448,

Re: [visualization-api] Re: Tooltip role in a ArrayToDataTable.

2013-08-13 Thread Steven Brooks
I ended up passing the script a ruby method which return an array of strings. I looped through those strings and ran "eval" on them so JS would run them as JS methods. Works and scaled perfectly. On Tuesday, August 13, 2013 12:10:05 PM UTC-4, asgallant wrote: > > You'll need to either include

Re: [visualization-api] Re: Tooltip role in a ArrayToDataTable.

2013-08-13 Thread Steven Brooks
Awesome. That worked. No all I need to do is make a method that will popular setColumnProperty the correct amount of times depending on how many columns I have. On Tue, Aug 13, 2013 at 12:10 PM, asgallant wrote: > You'll need to either include a column with those strings, or have that > informa

Re: [visualization-api] Re: Tooltip role in a ArrayToDataTable.

2013-08-13 Thread asgallant
You'll need to either include a column with those strings, or have that information somewhere in the DataTable so you can create the strings. Each data series needs its own tooltip column if you intend to override the default tooltips. On Tuesday, August 13, 2013 9:20:44 AM UTC-4, Steven Brook

Re: [visualization-api] Re: Tooltip role in a ArrayToDataTable.

2013-08-13 Thread Steven Brooks
Actually I guess what I would like to do is have each column have a similar tooltip with different information.. For example each column is the total weight a user lifted for an exercise in a weight training routine. I'd like the tooltips for each columns / (set) do display a string that I will

Re: [visualization-api] Re: Tooltip role in a ArrayToDataTable.

2013-08-13 Thread Steven Brooks
I only see a tooltip for the specific column that I choose. So if I choose column 2, that column has a tooltip and the others have their defaults. I'd like each column to have their own tooltip. Would I need to set each columns tooltip individually or have a universal tooltip? On Monday, Aug

Re: [visualization-api] Re: Tooltip role in a ArrayToDataTable.

2013-08-12 Thread asgallant
Using that method, it is just a tooltip. On Monday, August 12, 2013 6:34:54 PM UTC-4, Steven Brooks wrote: > > Would the column become solely a tooltip or will its be a tooltip as well > as data that will be displayed in the column? > > Steven Brooks > > > Sent from my iPhone > > > > > > On Aug 1

Re: [visualization-api] Re: Tooltip role in a ArrayToDataTable.

2013-08-12 Thread Steven Brooks
Would the column become solely a tooltip or will its be a tooltip as well as data that will be displayed in the column? Steven Brooks Sent from my iPhone On Aug 12, 2013, at 6:05 PM, asgallant wrote: > You need to call that before you draw the chart. For organization purposes, > I woul

[visualization-api] Re: Tooltip role in a ArrayToDataTable.

2013-08-12 Thread asgallant
You need to call that before you draw the chart. For organization purposes, I would call it immediately after creating the DataTable: var data = google.visualization.arrayToDataTable(graph); data.setColumnProperty (1, 'role', 'tooltip'); On Monday, August 12, 2013 5:47:47 PM UTC-4, Steven Brook

[visualization-api] Re: Tooltip role in a ArrayToDataTable.

2013-08-12 Thread Steven Brooks
Where exactly do you place the : data.setColumnProperty(2, 'role', 'tooltip'); ? My code looks like this: google.load("visualization", "1", {packages:["corechart"]}); google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable(graph); var op

[visualization-api] Re: Tooltip role in a ArrayToDataTable.

2013-07-17 Thread asgallant
You can't assign column roles in the #arrayToDataTable method - if you need to use that method, then the way to handle this is to assign the column role after the DataTable is created: data.setColumnProperty(2, 'role', 'tooltip'); On Wednesday, July 17, 2013 3:04:20 PM UTC-4, sgnv wrote: > > I

[visualization-api] Re: Tooltip role in a ArrayToDataTable.

2013-07-17 Thread sgnv
I have been trying to display tooltip on my chart can you please let me know if you have any suggestions.. https://www.google.com/jsapi";> google.load("visualization", "1", {packages:["corechart"]}); google.setOnLoadCallback(drawChart); function drawChart() { var

[visualization-api] Re: Tooltip role in a ArrayToDataTable.

2013-05-21 Thread John
Thanks. That's is working perfect! :D El martes, 21 de mayo de 2013 17:07:11 UTC+2, asgallant escribió: > > That happens when there are no selected elements (you are trying to access > the first element of an array with 0 elements). The select event fires > when an element is selected and whe

[visualization-api] Re: Tooltip role in a ArrayToDataTable.

2013-05-21 Thread asgallant
That happens when there are no selected elements (you are trying to access the first element of an array with 0 elements). The select event fires when an element is selected and when it is deselected, so you have to test for the length of the array: var selection = Chart.getSelection(); if (se

[visualization-api] Re: Tooltip role in a ArrayToDataTable.

2013-05-21 Thread John
1. The message is: Uncaught TypeError: Cannot read property '0' of undefined Any idea? Thanks! El martes, 21 de mayo de 2013 15:34:48 UTC+2, asgallant escribió: > > Open it in Chrome, view the developers console (ctrl+shift+j to open), and > select something in the cha

[visualization-api] Re: Tooltip role in a ArrayToDataTable.

2013-05-21 Thread asgallant
Open it in Chrome, view the developers console (ctrl+shift+j to open), and select something in the chart - what error messages appear in the console? On Tuesday, May 21, 2013 2:58:48 AM UTC-4, John wrote: > > Thanks for help me, buI tried that and I will not. > I assume that the user will select

[visualization-api] Re: Tooltip role in a ArrayToDataTable.

2013-05-20 Thread John
Thanks for help me, buI tried that and I will not. I assume that the user will select one just because they can make more selections at a time. The first line if it works (var selection = Chart.getSelection();), but the second is not.(var name = dataTable.getValue(selection[0].row, 3);) It freeze

[visualization-api] Re: Tooltip role in a ArrayToDataTable.

2013-05-20 Thread asgallant
The selection object is typically an array, which potentially contains multiple selected data points. If you are assuming that your users are only selecting one point (or the chart doesn't support multiple selections), then this is what you would do: var selection = Chart.getSelection(); var n

[visualization-api] Re: Tooltip role in a ArrayToDataTable.

2013-05-20 Thread John
How I can get the name of the tooltip. I'm using the event 'select' and the function getSelection and getValue, but the line getValue not work fine. I trie with several types code and I couldn't get the name. The code is: var selection = Chart.getSelection(); var name = dataT

[visualization-api] Re: Tooltip role in a ArrayToDataTable.

2013-05-20 Thread John
Thanks. That's work. -- 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, s

[visualization-api] Re: Tooltip role in a ArrayToDataTable.

2013-05-20 Thread asgallant
the #arrayToDataTable method doesn't support setting column roles. You can set the role explicitly after the DataTable is created like this: dataTable.setColumnProperty(3, 'role', 'tooltip'); On Monday, May 20, 2013 5:45:21 AM UTC-4, John wrote: > > Hi! > I'm using a Chart in which I like that