Peak picking (continuous)
Use the peakPicking
serie parameter (for serie line) to enable a basic peak picking algorithm. For a continuous serie, the library will search for the next local minima after a selected peak before allowing any other peak to be registered.
The option autoPeakPickingNb
(default: 4) is the maximum number of peaks to be selected. The library will select the highest from the whole set.
Use autoPeakPickingMinDistance
(default: 10) to set the minimal distance (in px) between two neighbouring peaks.
Source code
var graphinstance = new Graph( domGraph, {
dblclick: {
type: 'plugin',
plugin: 'zoom',
options: {
mode: 'total'
}
},
plugins: {
'zoom': {
zoomMode: 'x'
}
},
pluginAction: {
'zoom': {
shift: false
}
}
} );
graphinstance.newSerie( "msdata", {
autoPeakPicking: 'continuous'
}, 'line' )
.autoAxis()
.setData( serieData )
.XIsMonotoneous();
graphinstance.redraw();
graphinstance.drawSeries();