2015-03-03 29 views
1

我想知道如何在我試圖做數據可視化時在我的表上只顯示某些列。現在,每當我做一張桌子時,它會顯示每一個屬性或列。我試圖通過基於對keen.io文檔中提取的文檔上的猜測,以找出如何只顯示某些列的屬性(我註釋掉了我的錯誤的猜測)用Keen DataViz顯示只有某些列/屬性

var foo = new Keen.Query("extraction", { 
    eventCollection: "Purchases", 
    targetProperty: "zip", 
// I've commented out line 7 because it doesn't work, it was just my guess on syntax... 
// how do I only show certain columns of the table (columns are properties) 
// vs. showing the entire table? 
// propertyNames: ["zip","businessname"] 

    filters: [ 
    { 
    "property_name" : "zip", 
    "operator" : "eq", 
    "property_value" : "80016" 
    }, 
    { 
    "property_name" : "city", 
    "operator" : "eq", 
    "property_value" : "Aurora" 
    }] 
}); 
client.draw(foo, document.getElementById("chart-09"), { 
    chartType: "table", 
    title: "Table" 

}); 

https://gist.github.com/mrtannerjones/ba0cbd7340f2e016fcf2 - 這裏是一個鏈接上面的代碼除了在github上的情況下,格式不正確。

對不起,如果這個問題看起來非常基本或簡單,我仍然是學習如何編碼的新手。

回答

1

在Keen.io Google小組中使用David的幫助找到了修復程序。實際上,我在「屬性名稱」後面錯過了一個逗號,但更讓我感興趣的是數據可視化與駱駝大小寫和下劃線分隔符一起工作。 property_namespropertyNames都似乎工作。

相關問題