Closed lpatiny closed 2 years ago
@wadjih-bencheikh18 Could you try to implement this new dynamic chart in the story book ?
@lpatiny Could you explain "we can zoom in and labels are recalculated on the fly" please
If you look at the little movie it is not always to same labels (bestPeaks) that are displayed over the peaks. When you zoom in/out the bestPeaks should be recalculated using the code example and the the Annotations should be created based on the bestPeaks.
An advanced mass spectrum example has been implemented: https://zakodium.github.io/react-plot/?path=/story/experimental-spectra-mass--advanced-mass-example
It contains 3 properties in the data (https://github.com/zakodium/react-plot/blob/6ec53a22b75f2b371b26a21d08326fd78cc31a63/stories/data/HCys100OH_0.01.json):
We would like to reimplemented this example but make it dynamic:
Something similar to:
This will use as developper dependency
mass-tools
andml-spectra-processing
ml-spectra-processing is used to convert {x:[], y:[]} to [{x,y},{x,y},...] by https://github.com/mljs/spectra-processing/blob/master/src/xy/xyToXYObject.ts
I try here after to add some pseudocode knowing that the 'input' variable is 'mf' that by default has the value 'HCys10OH' but could be an input in the storybook