当我尝试进行数据可视化时,我想知道如何在我的表格上只显示某些列。现在,每次我做一个表格时,它都会显示每个属性或列。我试图弄清楚如何通过根据热衷于文档中提取的文档进行猜测来仅显示某些列属性(我已经注释掉了我的错误猜测)
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 上,以防某些内容格式不正确。
抱歉,如果这个问题看起来非常基本或简单,我在学习如何编码方面仍然很陌生。