Created
August 25, 2015 12:16
-
-
Save ohanetz/1f917a430175b38254ee to your computer and use it in GitHub Desktop.
joola table example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"_index": "webyclip", | |
"_type": "jdocument", | |
"_id": "6753bdfb2a79ff6a630e18be71aa9a40", | |
"_version": 1, | |
"_score": 1, | |
"_source": { | |
"aggregation_keys": { | |
"site": "ebay", | |
"user": "alex" | |
}, | |
"day": { | |
"cfa_events_count": 1, | |
"thumbnails_clicked_events_count": 0 | |
}, | |
"timestamp": "2015-08-22T03:59:19.086Z", | |
"_key": "6753bdfb2a79ff6a630e18be71aa9a40" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
joola.on('ready', function() { | |
new joola.viz.Table({ | |
container: '#example', | |
caption: 'How many users watched a video and purchased per day', | |
headers: true, | |
query: { | |
timeframe: 'last_30_days', | |
interval: 'day', | |
dimensions: ['aggregation_keys.site', 'aggregation_keys.user'], | |
metrics: [ | |
{ | |
key: '_key', | |
aggregation: 'ucount', | |
name: "Number of unique users", | |
} | |
], | |
filter: [ | |
{ | |
attribute: 'day.cfa_events_count', | |
operator: 'gt', | |
match: '0' | |
}, | |
{ | |
attribute: 'day.thumbnails_clicked_events_count', | |
operator: 'gt', | |
match: '0' | |
} | |
], | |
collection: 'Webyclip' | |
}, | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment