calipho-sib / feature-viewer

Library to visualize protein sequence features in javascript using D3 - From SIB CALIPHO group; neXtProt project
http://calipho-sib.github.io/feature-viewer/examples/
Other
110 stars 31 forks source link

Bar no smoothing line #43

Open sunworshipper opened 4 years ago

sunworshipper commented 4 years ago

Is there a way to look at the data without smoothing? i.e. you see a histogram like view with the actual data at each base?

MatSchaeff commented 4 years ago

There is actually a hidden parameter for the line feature, I should add it to the doc. I originately used it to compare different styles before selecting the actual way of displaying it. You can choose the type of line with the "interpolation" option when adding the feature. And you can find the different types of D3 interpolation here : https://coderwall.com/p/thtwbw/d3-js-interpolation-options Example :

ft3.addFeature({
    data: data,
    name: "test feature",
    color: "#667580",
    type: "line",
    height:"5",
    interpolation:"step-before"
});