This repository was archived by the owner on Sep 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
interactiveFilters.json
Ganesh Iyer edited this page Aug 30, 2017
·
2 revisions
Used to define the interactive filters panel that is displayed on the left of the dashboard.
This file describes how the dashboard should look like.
[
{
"attributeName": "A",
"visualization": {
"visType": "rowChart"
},
"statistics": "default"
},
{
"attributeName": "B",
"visualization": {
"visType": "pieChart"
},
"statistics": [
"count", "mean", "custom-myStat"
]
},
{
"attributeName": "C",
"visualization": {
"visType": "pieChart"
},
"statistics": [
"min", "max", "mean", "distinct", "median", "stdev", "count"
]
},
{
"attributeName": "D",
"visualization": {
"visType": "pieChart"
},
"statistics": "default"
}
]
- attributeName(String): The name of the attribute with which it is refered to. It should be the same as provided in the backend schema.
- visualization(Object): Used to define information regarding the visualization.
-
visType(String): The type of visualization to be done. Currently supports:
barChart,rowChartandpieChart. - statistics: The types of statistics to be computed for the attribute which it is refered to.
- The datatype of the attribute must be
enum(in thedataDescription.json) forrowChartandpieChart -
barChartmust havefloatorintegeras their dataType.
-
The statistics can be computed on all types of attributes but there are different statistics that make sense for different attributes.
-
By omitting this field, no statistics will be shown for that attribute.
-
statisticshavingdefaultwill automatically calculate all the possible statistics for that attribute-
numberorintegerattributes default statistics are:count,distinct,min,max,mean,median,stdev. - other attributes types default statistics are:
countanddistinct.
-
-
for custom statistics,
statisticsare accepting an array containing one or more statistics. Thus, the array can contain:- one or more of the abovementioned statistics (Ex: "count", "mean", etc)
- one or more of custom created statistics. For using custom created statistics, the user needs firstly to create
them in
/modules/customStatistics.js. The name is at the user's choice but they need to be put in the global context. When specifing them within the configuration file, the name needs to have a certain format: "custom-" + the name of the statistic as it was named incustomStatistics.jsfile. Ex: "custom-myStat". Further is an example of implementing a new statistic:
global.sum = function (data, attr) { var sum = 0; for (index in data) { sum += data[index][attr]; } return sum; };