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 data is in is at https://docs.google.com/spreadsheets/d/1HkdVxj-b8B4N4waRm092LMjKoBrnGRAMp4_hZVuD6kw/edit#gid=988755849 which contains the calculated tooltip text. I thought that by adding dataCalcTooltips.setColumnProperties(2, {'type': 'string', 'role': 'tooltip', 'p': {'html': true}}); and tooltip: {isHtml: true} to the options, then it should display the text as HTML but it does not. Am I missing something? Can it be done using ths method? The code can be seen at http://brisray.com/test/timeline.htm It might not be possible, but I have another question, is there a way to control the height of the rows in the chart? My code: <script type="text/javascript" >> src="https://www.gstatic.com/charts/loader.js"></script> > > > <script type="text/javascript"> > > google.charts.load("current", {packages:["timeline"]}); > > google.charts.setOnLoadCallback(drawCalcTooltipsTimeline); > > >> function drawCalcTooltipsTimeline() { > > >> var query = new google.visualization.Query( > > >> 'https://docs.google.com/spreadsheets/d/1HkdVxj-b8B4N4waRm092LMjKoBrnGRAMp4_hZVuD6kw/gviz/tq?gid=988755849&headers=1'); > > query.send(handleCalcTooltipsQueryResponse); > > } > > >> function handleCalcTooltipsQueryResponse(response) { > > if (response.isError()) { > > alert('Error in query: ' + response.getMessage() + ' ' + >> response.getDetailedMessage()); > > return; > > } > > >> var options = { > > height: 600, > > tooltip: {isHtml: true} > > }; > > >> var dataCalcTooltips = response.getDataTable(); > > // set the 3rd column to the "tooltip" role > > dataCalcTooltips.setColumnProperties(2, {'type': 'string', 'role': >> 'tooltip', 'p': {'html': true}}); > > var chart = new >> google.visualization.Timeline(document.getElementById('timelineCalcTooltips_div')); > > chart.draw(dataCalcTooltips, options); > > } > > </script> > > >> <div id="timelineCalcTooltips_div"></div> > > -- 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 https://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/324d8c01-0a1e-4a53-80ea-8b12d5502622%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.