If your tooltips are appearing when you mouse over the wrong location, then
you likely have some CSS/HTML properties in your page that are affecting
the positioning of the chart's container div in a way that the API is not
expecting. Another user had a similar problem recently (see
this<https://groups.google.com/forum/#!topic/google-visualization-api/FV_5X07hInM>thread),
and it was caused by using some odd combination of HTML attributes
and CSS to center his chart on the page. I don't recall specifically what
was used prior to the fix (the page in question has since been updated so I
can't find the old code), but I think it was caused by a div like this:
<div align="center">
<div id="chart_div"></div>
</div>
My recommendation is to examine your code and make sure that any
positioning effects come from CSS and not from HTML attributes. If you fix
those (or don't find any) and the problem persists, then post code that
replicates the problem so we can test it.
On Monday, December 16, 2013 10:10:58 AM UTC-5, Jean-Luc Picard wrote:
>
> I put my mouse pointer on the "2008" label and moved up the line and the
> tooltip appeared, but only when the mouse pointer was at the next vertical
> line above the data line. I found this to be true for each data point.
>
> When I try the examples on the Google Charts reference pages, like this
> one (
> https://developers.google.com/chart/interactive/docs/gallery/linechart?hl=en),
>
> the tooltips appear when the mouse is directly over the data line at the
> data point. I don't understand why mine is offset about 20 pixels above the
> line.
>
> Is one of the settings I have throwing it off somehow?
>
>
>
> On Monday, December 16, 2013 9:04:18 AM UTC-5, Jean-Luc Picard wrote:
>>
>> Here is my code. When I mouseover the line, no tooltips appear. How can I
>> fix it?
>>
>> // Create the data table.
>> var data = new google.visualization.DataTable()
>>
>> data.addColumn('date', 'Date');
>> data.addColumn('number', 'Sales');
>> data.addRows(
>> [
>> [new Date(2009,11,30), 127937.12],
>> [new Date(2010,0,27), 102678.18],
>> [new Date(2010,1,24), 101179.74],
>> [new Date(2010,2,24), 96110.67],
>> [new Date(2010,3,21), 99960.16],
>> [new Date(2010,4,19), 90222.82],
>> [new Date(2010,5,16), 103857.97],
>> [new Date(2010,6,14), 119192.29],
>> [new Date(2010,7,11), 99457.08]
>> ]
>> )
>>
>> // Set chart options
>> var options = {'title':'Test',
>> 'width':1200,
>> 'height':300,
>> 'hAxis': {ticks: [{v:new Date(2010,0,27), f:'2008'},
>> {v:new Date(2010,1,24), f:'2009'}
>> ],
>> minorGridlines:{count:3}
>> }
>> };
>>
>> // Instantiate and draw our chart, passing in some options.
>> var chart = new
>> google.visualization.LineChart(document.getElementById('chart'));
>> chart.draw(data, options);
>>
>
--
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.