Skip to content

Commit

Permalink
#29 incorrect metrics: [] assignment in examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
itayw committed Apr 3, 2014
1 parent e57fd9b commit 8fcf246
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ var query = {
timeframe: 'last_hour',
interval: 'minute',
dimensions: [],
metrics: 'visits'
metrics: ['visits']
};

joolaio.query.fetch(query, function(err, results) {
Expand Down Expand Up @@ -334,10 +334,10 @@ var query = {
timeframe: 'last_hour',
interval: 'minute',
dimensions: [],
metrics: {
metrics: [{
key: 'visits',
name: 'Visit Count'
},
}],
filter: [
['user.username', 'eq', 'thisisme']
]
Expand All @@ -361,13 +361,14 @@ var query = {
timeframe: 'last_hour',
interval: 'minute',
dimensions: [],
metrics: {
metrics: [{
key: 'visits',
name: 'Visit Count',
formula: {
dependsOn: ['visits', 'clicks'],
run: 'function(visits, clicks) { return visits * clicks; }'
}
}]
};

joolaio.query.fetch(query, function(err, results) {
Expand All @@ -384,11 +385,11 @@ var query = {
timeframe: 'last_hour',
interval: 'minute',
dimensions: [],
metrics: {
metrics: [{
key: 'bandwidth',
name: 'Bandwidth (KB)',
transform: 'function(value) { return value / 1024 ; }'
}
}]
};

joolaio.query.fetch(query, function(err, results) {
Expand Down Expand Up @@ -548,4 +549,4 @@ Copyright (c) 2012-2014 Joola Smart Solutions. GPLv3 Licensed, see [LICENSE][24]

[joola.io]: http://joola.io/
[free.joola.io]: http://free.joola.io/
[highcharts]: http://www.highcharts.com
[highcharts]: http://www.highcharts.com

0 comments on commit 8fcf246

Please sign in to comment.