Uncaught Error: Unknown header type: 10532
Closed this issue · 6 comments
Attempting the simple visualization example:
Keen.ready(function(){
var count = new Keen.Query("count", {
eventCollection: "views",
groupBy: "event.id",
interval: "daily",
timeframe: "this_21_days"
});
keen.draw(count, document.getElementById("chart-wrapper"));
});
with "views" collection event data like:
{
"keen": {
"timestamp": "2016-02-12T21:30:09.456Z",
"created_at": "2016-02-12T21:30:09.456Z",
"id": "56be4ee190e4bd6cbed434c0"
},
"event": {
"id": 12798,
"parent_id": 12797,
"status": "published",
"starttime": "2016-03-05T14:00:00.000Z",
"tags": [
"Performance"
],
"name": "The Sea Voyage by John Fletcher and Phillip Massigner ",
}
}
results in a JS runtime error Uncaught Error: Unknown header type: 10532
(Note: 10532 is probably one of the event.id
's).
It works fine if you use groupBy: "event.name"
. Perhaps a bug due to event.id
being numeric?
I just re-created this same query in the Keen explorer and was able to get the visualization.
The embed code there looks pretty much the same (although groupBy is an array, which should also work).
Can you confirm what version of keen-js you are usings?
var query = new Keen.Query("count", {
eventCollection: "views",
groupBy: [
"event.id"
],
timeframe: "this_21_days",
timezone: "UTC"
});
client.draw(query, document.getElementById("my_chart"), {
});```
Meekohi provided a fiddle where this issue is present:
keen-js is able to query & render this as a pie chart, but it breaks as soon as you add an interval to turn into a line chart or bar chart.
For some reason this issue is not present in the keen-explorer, perhaps the explorer is using a newer version of keen-js (keen_viz.js?)?
Here is the version of keen-js the customer is using in the Fiddle:
"https://d26b395fwzu5fz.cloudfront.net/3.4.0-rc/keen.min.js"
I just swapped that latest version in and it appears to be working just fine. Closing this issue for now, but please ping me if I should re-open.
I can confirm issue is fixed in -rc4
. 👍