使用google可视化API,有没有一种方法可以使带有缩写的列标题的表显示完整的列标签?
下面是javascript的一小段代码:
//create the dashboard and table chart
var dashboard = new google.visualization.Dashboard(
document.getElementById('dashboard_div'));
table = new google.visualization.ChartWrapper({
'chartType': 'Table',
'containerId': 'chart_div',
'view': {'columns': ViewColumns},
'options': {
height: 400,
},
});
dashboard.bind(table);
//bind the data to the table
baseData = new google.visualization.DataTable(response);
dashboard.draw(baseData);
//add a column chart bound to the same data
var columnChart = new google.visualization.ChartWrapper({
'chartType': 'ColumnChart',
'containerId': 'column_chart_div',
'options': {
isStacked: true,
height: 400,
width: 800,
},
});
columnChart.setDataTable(table.getDataTable());
columnChart.draw();HTML:
<div id="dashboard_div">
<div id="column_chart_div" class="inline"> </div>
<div id="chart_div"></div>发布于 2016-11-13 23:59:42
th.google-visualization-table-th {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 50px;
}
th.google-visualization-table-th:hover {
white-space: nowrap;
overflow: visible;
}如果我可以在鼠标悬停时弹出全文(在相邻列的上方),这将是完美的,但我一直没有运气。
https://stackoverflow.com/questions/40575558
复制相似问题