首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Google Visualization缩写列标签

Google Visualization缩写列标签
EN

Stack Overflow用户
提问于 2016-11-13 23:34:33
回答 1查看 209关注 0票数 0

使用google可视化API,有没有一种方法可以使带有缩写的列标题的表显示完整的列标签?

下面是javascript的一小段代码:

代码语言: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:

代码语言:javascript
复制
  <div id="dashboard_div">
    <div id="column_chart_div" class="inline"> </div>
    <div id="chart_div"></div>
EN

回答 1

Stack Overflow用户

发布于 2016-11-13 23:59:42

代码语言:javascript
复制
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;
}

如果我可以在鼠标悬停时弹出全文(在相邻列的上方),这将是完美的,但我一直没有运气。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40575558

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档