Try double clicking the annotations to move them.
var annotationsScatterplot = new proteic.Scatterplot(data,{
xAxisLabel:'Petal length (cm)',
yAxisLabel:'Petal width (cm)',
markerShape: 'star',
legendPosition: 'bottom',
})
.annotations([
{ type: 'threshold', axis: 'y', value: 1.8, text: 'Mean width' },
{ type: 'threshold', axis: 'x', value: 2, text: 'Mean length' }
]);
annotationsScatterplot.draw();
var chart = new proteic.Linechart(data,{...})
.annotations([
{ type: 'threshold', axis: 'y', variable: 'flow', text: 'current flow'}
])
.datasource(ds)
Data from: Time Series Data Library (citing: Andrews & Herzberg (1985)) via DataMarket*
* Error data has been faked for demonstration purposes.
var chart = new proteic.Linechart(data,{...})
.annotations([
{ type: 'threshold', axis: 'y', variable: 'flow', text: 'current flow'},
{ type: 'band', axis: 'y',
variable: 'flow', width: 'flowError', text: 'error'}
])
.datasource(ds)
The confidence band can be defined
var chart = new proteic.Linechart(data,{
...
confidenceBandOpacity: 0.3
})
.unpivot(['rain', 'flow'])
.statistics([
{ type: 'confidenceBand', variable: 'flow', confidence: 'flowError',
modifier: (confidence) => 0.1 * confidence }
])
.datasource(ds);
var chart = new proteic.Linechart(data,{...})
.unpivot(['flow', 'flowMean'])
.statistics([
{ type: 'confidenceBand', variable: 'flowMean', confidence: 'flowError',
modifier: (confidence) => 0.5 * confidence }
])
.alert('flow', (value, events) => {
return value > events.get('flowMean') + events.get('flowError') ||
value < events.get('flowMean') - events.get('flowError');
}, callback, ['flowMean', 'flowError'])
.datasource(ds)
The legend position can be customised.
legendPosition: right
legendPosition: bottom
legendPosition: top