Releases: keen/keen-dataviz.js
Releases · keen/keen-dataviz.js
v3.10.4
v3.10.2
Fixes:
- Axis still visible for sparkline charts with stacking: percent
v3.10.1
v.3.10.0
New feature:
Ability to download results from chart #133
const chart = new Keen.Dataviz({
container: '#container', // required
ui: {
buttons: {
download: {
label: 'Download as a JPG file', // optional - by default it's just "Download"
type: 'jpg', // optional - by default it's 'json', supported types ['jpg', 'jpeg', 'png', 'csv', 'json']
}
}
}
});
v3.9.0
New feature
export SVG charts into PNG/JPEG #134
// method by default generates PNG image
chart.exportImage();
// if quality provided then JPEG is generated
// quality - a number between 0 to 1 indicating image quality (quality = 0 generates PNG image)
// bgcolor - a string value for background color, any valid CSS color value (defaults to '#fff')
chart.exportImage({ quality: 1, bgcolor: 'blue' });
v3.8.1
v3.8.0
Color Palettes
New features:
- predefined color palettes:
autocollector
,modern
,dracula
v3.6.0
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);
});
v3.5.0
New Features:
- Metric combo chart
This type combines metric
and area-spline
type of charts
const chart = new KeenDataviz({
container: '#some_container',
type: 'metric-combo',
metricResults: { // data required for metrics
previous,
current,
},
results // data required for area-spline
})
- resize charts when the container's size has changed