【问题标题】:Apply chart range filter in Google Table在 Google Table 中应用图表范围过滤器
【发布时间】:2013-12-13 10:00:16
【问题描述】:

我需要在 google 表格中的隐藏列上应用基于日期的图表范围过滤器。为此,我创建了这样的 Google 表实例

var data = new google.visualization.DataTable();

我在此表中添加了列,然后我创建了像这样的 google dataview 对象

var view = new google.visualization.DataView(data);
        view.hideColumns([0]);

data 是此处的数据表实例,我隐藏了第一列,但没有隐藏它,而是将其删除。如何隐藏此列

【问题讨论】:

    标签: google-visualization


    【解决方案1】:

    您需要设置表格的 ChartWrapper 对象的view.columns 参数。这将为要使用的 Table 创建一个私有 DataView,仅显示您在 columns 参数中指定的列,例如:

    view: {
        // show only columns 1-4 in the Table
        columns: [1, 2, 3, 4]
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-11-25
      • 2015-03-03
      • 1970-01-01
      • 2016-10-27
      • 1970-01-01
      • 1970-01-01
      • 2020-11-18
      • 2020-10-15
      相关资源
      最近更新 更多