javascript - 鼠标悬停时工具提示未正确显示

标签 javascript html css angularjs google-visualization

我正在研究 angularjs 谷歌图表。我想显示图表的水平滚动条,默认情况下它应该从右向左滚动

在应用 css 代码从右向左滚动之前的工作演示(鼠标悬停时的工具提示按预期显示): Working Demo before horizontal scrollbar is applied from right to lefft

应用CSS代码从右向左滚动后的演示 Demo, tooltip is not showing as expected when mouseover on the bar

html代码:

 <div ng-controller="myController" style="width:100%;height:50%;margin-left:0;white-space: nowrap;overflow-x:auto;overflow-y:hidden;direction:rtl;left:0;top:0;">
   <div style="width:90%;height:90%;" google-chart chart="myChart">
   </div> </div>

CSS 代码:

div[aria-label="A tabular representation of the data in the chart."] {
  left: 0 !important;}

问题是工具提示 onmouse over 在栏上,有任何输入吗?

最佳答案

您需要将包含图表的 div 更改为:

 <div style="width:100%;height:50%;margin-left:0;white-space: nowrap;overflow-x:auto;overflow-y:hidden;right:0;top:0;">

可以测试一下here .

关于javascript - 鼠标悬停时工具提示未正确显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46124268/

相关文章:

javascript - 如何将带有函数的 javascript 数据转储为可评估的字符串?

html - 为什么 WebGL 比 Canvas 快?

css - 覆盖可点击的 d3 元素时无法点击 div

css - Bootstrap CSS 行对齐问题

asp.net - 为什么 CSS 类不能包含另一个 CSS 类

html - 表格行旁边的 float 元素

php - 是否可以有一个离线数据库

javascript - 循环/javascript euler 中的错误# 5

javascript - 谷歌图表 : Plotting mutiple "Y" values on same "X" value

jquery - 按下按钮时动画跨度