statgen / locuszoom

A Javascript/d3 embeddable plugin for interactively visualizing statistical genetic data from customizable sources.
https://statgen.github.io/locuszoom/
MIT License
154 stars 29 forks source link

Improve handling of filled curves #147

Closed abought closed 5 years ago

abought commented 5 years ago

References #139

Purpose

Improves rendering of filled curves when using style.fill config option on the existing line layer.

The previous option worked by implicitly closing the path (joining first and last point). This produced undesirable results if the endpoints were not already flat with the y-axis (see example).

Summary of changes

The new behavior changes the mechanism by which the path is generated to more explicitly fill the area between the data and the y-axis.

Before: screen shot 2018-10-03 at 4 20 28 pm

After: screen shot 2018-10-03 at 4 35 13 pm

abought commented 5 years ago

Implementation very similar to one used by the T2D portal.

Will show this to a few prospective users. If there are no further requests, I'll merge in ~1wk.