Skip to content

Latest commit

 

History

History
236 lines (161 loc) · 10.6 KB

CHANGELOG.md

File metadata and controls

236 lines (161 loc) · 10.6 KB

3.2.4 Data transform bug fixes and minor Visualization improvements

  • Fixed a bug in Dataset access methods for rows and columns (select, 'insert', 'update', 'delete') that caused string selections beginning with a number to fail (#255)
  • Fixed a bug introduced in v3.2.3 that prevented labels from updating properly when new query responses were parsed by a Dataviz instance
  • Spinner now uses a default height when no height is provided for a Dataviz instance. This can be configured by overriding Keen.Spinner.defaults.height
  • Updated ChartJS to latest version (v1.0.2) and now apply height/width to constructed <canvas></canvas> elements
  • AWC cache life extended to 1 full year

3.2.3 Dataviz improvements and bug fixes

  • New .stacked(boolean) method for Keen.Dataviz (default is false), configured for C3.js and Google Charts adapters (#231, #233)
  • Cryptic "Data column(s) for axis #0 cannot be of type string" (Google Charts adapter) has been replaced with something less severe. This was caused when receiving an interval+group_by query response where every result value array is empty (#234)
  • Add support for select_unique responses (table, #236)
  • General doc updates and improvements

3.2.2 Fix packaging for browserify

  • Move browserify-version package from dev dependencies to regular dependencies, so the npm module can be browserified without issue. (#233)

3.2.1 Minor bug fixes

  • Removed unnecessary return statement (#214 - thanks @Tom-Alexander)
  • chartOptions that carry a value of false are no longer magically changed to null (#215)

3.2.0 keen-js learns to node.js (2014-12-28)

This library now runs in the browser and the server, and can be installed via npm: npm install keen-js

New to keen-js

  • 'client.addEvents' - record multiple events with a single API call (#108)
  • 'client.addEvent("collection", data, null, false)' - fourth argument of null invokes a synchronous XHR call, which is useful for sending events before a page unloads (#188)
  • 'client.get' - execute a generic GET request (New approach to #139)
  • 'client.put' - execute a generic PUT request
  • 'client.post' - execute a generic POST request
  • 'client.del' - execute a generic DELETE request (server-only)
  • Keen.utils.encryptScopedKeys - create a new scoped key
  • Keen.utils.decryptScopedKeys - decrypt an existing scoped key
  • Keen.noConflict – avoid version collisions (#159)
  • Keen.Request object supports timeouts (explained below), and must be explicitly run with .refresh() (#209, wip)
  • "Metric" visualization shows raw value via the HTML element's title attribute (#206, wip)
var req = new Keen.Request(client, [query1, query2], callback)
  .timeout(300*1000)
  .refresh();

Keen.Visualization has been removed

This object doesn't add any value, and only creates more surface-area for new users to reason about.

Check out Keen.Dataviz for building customized visualizations. The docs have been updated to reflect this object's departure, and .run still works as expected.

Breaking change to all callback signatures

All callbacks now use the single function (err, res) callback pattern common to node.js. This was done to make implementations portable between the browser and the server.

This:

client.run(query, function(res){
  // handle response
}, function(err){
  // handle error
});

Now looks like this:

client.run(query, function(err, res){
  // if (err) handle err
  // handle response
});

Build/test-related

3.1.0 Visualization Reboot (2014-11-03)

Complete rewrite of Keen.Visualization, resulting in two brand new tools for creating dynamic, highly-customizable data visualizations.

  • Composable interface for on-the-fly modifications of pretty much everything
  • Improved memory management, smaller footprint, better performance
  • Charts render a million times faster (not benchmarked, but srsly, it's silly)
  • Two new chart library adapters: Chart.js and C3.js. Either can be configured as the default
  • Expanded color palette with 18 light+dark variants: now at 27 colors!
  • Explicit methods for handling different types of data
  • Explicit methods for updating charts, with full control of "loading" state spinner
  • Display custom error messages
  • Determine if intervals should be indexed by "timeframe.start" or "timeframe.end"
  • Sort both groups and intervals, ascending or descending

Dataset is an abstraction layer that handles data inside of Keen.Dataviz. This tool unpacks arbitrary JSON into a 2-dimensional array (a table), and offers a set of simple but powerful tools for modifying, filtering and sorting that data. Keen.Dataviz charting adapters all know how to unpack this data format into their own crazy needs.

I'll build out a series of demos that showcase what this tool can do, but here are a few examples that you can accomplish with a few (like one or two) lines of javascript:

  • For a group_by + interval query:
  • Insert a new series that shows the median (sum/min/max/etc) value of all data points at each interval
  • Sort groups bases the those same results (sort by sum of each series)
  • Remove all records/series that fall below a given threshold (only show the top N results)
  • Multiply all results by 100, or any number
  • Join multiple queries into one chart

The big idea here is that it takes something that once took dozens or hundreds of lines of loopy JS magic and turns it into a quick, repeatable, easily-customizable use of a documented feature.

Test Coverage

We added over 150 new tests to cover these two classes, and have expanded our test coverage to include iOS (6-7.1), Android (4.1-4.4), and Chrome/Firefox Beta builds.

Optimizations

Disable sending of events by setting Keen.enabled = false;. This is handy for disabling event recording from local or development environments.

Refactored our loading script, makes it easy to stay up to date with the latest version. Now, when users see the JS blob for embedding our library in the page, it'll look like this:

!function(i,o){i("Keen","//d26b395fwzu5fz.cloudfront.net/3.1.0/keen.min.js",o)}(function(a,b,c){var d,e,f;c["_"+a]={},c[a]=function(b){c["_"+a].clients=c["_"+a].clients||{},c["_"+a].clients[b.projectId]=this,this._config=b},c[a].ready=function(b){c["_"+a].ready=c["_"+a].ready||[],c["_"+a].ready.push(b)},d=["addEvent","setGlobalProperties","trackExternalLink","on"];for(var g=0;g<d.length;g++){var h=d[g],i=function(a){return function(){return this["_"+a]=this["_"+a]||[],this["_"+a].push(arguments),this}};c[a].prototype[h]=i(h)}e=document.createElement("script"),e.async=!0,e.src=b,f=document.getElementsByTagName("script")[0],f.parentNode.insertBefore(e,f)},this);

Client configuration

Internals have changed: Client instances have an internal hash that contains properties, like projectId and readKey. This internal hash was previously called client, but has been renamed config. Reason being, "client" has become a popular name for new instances, resulting in strange references like client.client.projectId.

You can now also reference projectId and keys w/ a set of getter-setter methods, like so:

var client = new Keen({
  projectId: "123",
  readKey: "123456789"
});
client.projectId(); // returns "123"
client.readKey(); // returns "123456789"

3.0.9 Improved request handling (2014-10-01)

This update greatly improves request handling for sending and querying events.

If JSONP is selected and the produced URL exceeds a given threshold, the library attempts to use XHR/POST if supported.

We have also added more robust support for XHR in older versions of IE, and expanded test coverage to include iOS (6-7.1), Android (4.1-4.4), and Chrome/Firefox Beta builds.

3.0.8 Improved memory management for Keen.Visualization (2014-08-18)

Call .remove() or .trigger("remove") on a chart for proper disposal.

3.0.7 Bug fixes, timezone fixes, query refreshing (2014-08-06)

No notes, sorry

3.0.6 [YANKED]

3.0.5 AMD Support

This release refactors internal dependency placement to allow for easy use with RequireJS. The library is loaded with an explicitly named module ID ("keen"), which presents a light configuration step, but prevents anonymous define() mismatch mayhem.

Example implementation:

requirejs.config({
  paths: {
    "keen": "http://d26b395fwzu5fz.cloudfront.net/3.0.5/keen.js"
  }
});
require([ "keen" ], function(Keen) {
  var client = new Keen({ ... });
});

3.0.4 Important patch for IE11

Fixed a type-check method that caused queries to fail in IE11 (#96).

3.0.3 Visual Error Messages

client.draw() now visualizes API response messages when errors occur.

3.0.2 Fixed trackExternalLink and data sorting

Fixed an issue with trackExternalLink ignoring target="_blank" attributes, and failing to execute when anchor tags have nested DOM elements like <span> tags.

Applied column sorting to static group-by queries, for better arrangment in pie and bar charts.

Fixed #73, #90 and #92

3.0.1 Visualization bug fixes and enhancements

  • Keen.Metric now supports chartOptions.prefix, chartOptions.suffix, and has more stable colors handling.
  • Grouped interval responses are presented with a multi-line chart now.
  • Changed chartType: "datatable" to table. datatable was left behind from an internal project, but breaks the naming pattern we want to establish with underlying libraries.
  • Expanded color palette

Color wheel

Resolves #72, #74, #76, #80, #82, #85, #86, #87

3.0.0 Hello, world

Initial re-release of keen-js!