小编wis*_*ser的帖子

谷歌时间轴可视化中的垂直参考线

嗨,我正在使用谷歌可视化API在我的网站绘制时间表图表.它工作得很好.但是有一件事困扰着我.我想在图表区域中显示一条垂直线来表示当前日期.请让我知道任何解决方案.

我的代码:

<script type="text/javascript" src="https://www.google.com/jsapi?autoload={'modules':[{'name':'visualization','version':'1','packages':['timeline']}]}"></script>

<script type="text/javascript">
google.setOnLoadCallback(drawChart);
function drawChart() {

  var container = document.getElementById('example3.1');
  var chart = new google.visualization.Timeline(container);

  var dataTable = new google.visualization.DataTable();
  dataTable.addColumn({ type: 'string', id: 'Position' });
  dataTable.addColumn({ type: 'string', id: 'Name' });
  dataTable.addColumn({ type: 'date', id: 'Start' });
  dataTable.addColumn({ type: 'date', id: 'End' });
  dataTable.addRows([
    [ 'President',          'George Washington', new Date(2014, 3, 29), new Date(2014, 4, 3)],
    [ 'President',          'John Adams',        new Date(2014, 2, 3),  new Date(2014, 3, 3)],
    [ 'President',          'Thomas Jefferson',  new Date(2014, …
Run Code Online (Sandbox Code Playgroud)

google-api google-visualization

16
推荐指数
4
解决办法
9968
查看次数

如何设置Google时间线图表的最短和最晚日期?

我想在Google时间线图表中设置最小和最大日期. Google时间线图表

我试过用

 hAxis: {
        viewWindow: {
          min: new Date(2014, 1, 31)
        }}
Run Code Online (Sandbox Code Playgroud)

 hAxis: {
        viewWindow: {
          minValue: new Date(2014, 1, 31)
        }}  
Run Code Online (Sandbox Code Playgroud)

两者都不起作用.如果无法设置日期范围,如何获取api本身设置的最小值和最大值?

google-visualization

13
推荐指数
1
解决办法
7061
查看次数

如何在Google时间轴图表中将背景设置为透明?

我正在尝试将Google时间线图表的背景设置为透明。时间线图

尝试使用

backgroundColor: 'none'
backgroundColor: 'transparent'
Run Code Online (Sandbox Code Playgroud)

似乎没有任何工作。

我也尝试使用

alternatingRowStyle: false
Run Code Online (Sandbox Code Playgroud)

删除行中的交替颜色。它也不起作用。还有其他想法吗?

css google-visualization

3
推荐指数
2
解决办法
1106
查看次数

SSL安装后,某些脚本停止工作

我使用以下代码打印div元素内的内容.这对我来说很好,直到我在我的服务器中安装了SSL证书.如果我通过访问页面,代码仍然有效http://.但是,通过访问同一页面时它无法正常工作https://.我需要帮助解决这个问题.

function PrintElem(elem)
{
    Popup($(elem).html());
}

function Popup(data) 
{
    var mywindow = window.open('', 'Business Sense Chart', 'height=600,width=1200');
    mywindow.document.write('<html><head><title>Business Sense Analytics</title>'); 
    mywindow.document.write('<link rel="stylesheet" href="./css/style.css" type="text/css" />');
    mywindow.document.write('</head><body><center>');
    mywindow.document.write(data);
    mywindow.document.write('</center></body></html>');
    mywindow.print();
    return true;
}
Run Code Online (Sandbox Code Playgroud)

注意:当我使用firebug诊断错误时,它显示错误"$不是函数".类似的其他脚本也面临同样的问题.

javascript ssl https jquery

0
推荐指数
1
解决办法
4856
查看次数

标签 统计

google-visualization ×3

css ×1

google-api ×1

https ×1

javascript ×1

jquery ×1

ssl ×1