From 42e2f9e4b1f360af341db7739895c23bab4fbf83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Wed, 7 Jun 2017 15:54:19 +0200 Subject: [PATCH] Update commented use cases --- lib/cartodb/models/dataview/histogram.js | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/lib/cartodb/models/dataview/histogram.js b/lib/cartodb/models/dataview/histogram.js index 1bf24df2..43b6ee86 100644 --- a/lib/cartodb/models/dataview/histogram.js +++ b/lib/cartodb/models/dataview/histogram.js @@ -176,13 +176,23 @@ var dateHistogramQueryTpl = dot.template([ var TYPE = 'histogram'; /** - { - type: 'histogram', - options: { - column: 'name', - bins: 10, // OPTIONAL - aggregation: 'day' // OPTIONAL - } +Numeric histogram: +{ + type: 'histogram', + options: { + column: 'name', // column data type: numeric + bins: 10 // OPTIONAL + } +} + +Time series: +{ + type: 'histogram', + options: { + column: 'date', // column data type: date + aggregation: 'day' // OPTIONAL (if undefined then it'll be built as numeric) + timezone: -7200 // OPTIONAL (UTC offset in seconds) + } } */ function Histogram(query, options, queries) {