1

錯誤:0列不是數字, 列0是我的日期列谷歌圖表數值日期

data.addColumn('date', 'Date'); 
... 
// The variable date here is an epoch 
var fullDate = new Date((parseInt(date)*1000)); 
r.push(new Date(fullDate.getYear(), fullDate.getMonth(), fullDate.getDay())); 
// Logging r here yields: Mon Mar 06 113 00:00:00 GMT+1100 (EST) 
... 
var slider = new google.visualization.ControlWrapper({ 
    'controlType': 'NumberRangeFilter', 
    'containerId': 'control1', 
    'options': { 
    'filterColumnLabel': 'Date', 
     'ui': {'labelStacking': 'vertical'} 
    } 
}); 

我想我需要找到一種方法,使最新的數字?

回答

1

另一種解決方法是不改變日期數字,改變滑塊的控制類型。

'controlType': 'ChartRangeFilter',