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 advantage of this is you can use whatever language you 
feel comfortable with. After you import it into the Google data table you 
can assign the role of tooltip to it by using setColumnProperty. For 
example  data.setColumnProperty(4, 'role', 'tooltip');

2) Add a column to the data table after it has been imported.

See 
https://developers.google.com/chart/interactive/docs/reference?hl=en#DataTable_addColumn
 and 
then calculate the tooltip value using setColumns 
- 
https://developers.google.com/chart/interactive/docs/reference#DataView_setColumns

The column role as tooltip can be set in either method.  This might help 
show what you are trying to do - 
https://stackoverflow.com/questions/46613501/how-to-add-a-style-role-column-to-a-google-charts-aggregated-datatable

3) Change the formatted value of the date column cells

The Google data table cells can contain two values, the "real" value and a 
formatted value. Where it can the API uses the formatted value.The 
documentation has methods for getting and setting both values - look for 
setCell,  getValue,  getFormattedValue,  setValue, and setFormattedValue 
on https://developers.google.com/chart/interactive/docs/reference

Doing this means creating a loop by getting the number of rows in the 
column using getNumberOfRows() then loop through each row, getting the 
value of whatever column hold the date using getValue and writing a new 
formatted version of it using either setCell or setFomattedValue.

var totalRows = data.getNumberOfRows(); for (i = 0; i < totalRows; i++) { 
var dateValue = getValue(i,2)
   // Do whatever you want to the date value
    setFormattedValue(i, 2, dateValue)  
}
On Saturday, December 18, 2021 at 4:55:09 AM UTC-5 [email protected] 
wrote:

> when i go on the line with the mouse, the date and time are displayed. i 
> would like to have the time displayed in 24 hour mode. who has an idea how 
> I can do it. or in which part of the program this is specified?
>
>
> best
> meinolf
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/4683169e-22ea-43b7-b2c1-4248277161a4n%40googlegroups.com.

Reply via email to