Skip to content

v3.6.0

Compare
Choose a tag to compare
@dariuszlacheta dariuszlacheta released this 08 Apr 07:07
· 189 commits to master since this release

New Features:

Range charts #162

New chart types added:

  • bar-range
  • horizontal-bar-range
  • area-range
  • area-range-step
  • area-range-spline

Example:

const countMin = client
  .query({
    analysis_type: 'minimum',
    event_collection: 'user_action',
    target_property: 'bio_sensors.heart_rate',
    timeframe: {
      start: '2014-02-02T00:00:00.000-00:00',
      end: '2014-04-01T00:00:00.000-00:00'
    },
		interval: 'weekly'
  });

const countMax = client
  .query({
    analysis_type: 'maximum',
    event_collection: 'user_action',
    target_property: 'bio_sensors.heart_rate',
    timeframe: {
      start: '2014-02-02T00:00:00.000-00:00',
      end: '2014-04-01T00:00:00.000-00:00'
    },
		interval: 'weekly'
  });

// Use keen-analysis.js to run a query
// and pass the result into your chart:
client
  .run([countMax, countMin])
  .then(function(res) {
    // Handle the result
    chart
      .render(res);
  })
  .catch(function(err) {
    // Handle the error
    chart
      .message(err.message);
  });