Each bar in the top chart represents an individual's time of entry and exit from a study. The color of the bar indicates which type of exit they had. The bottom chart is a Kaplan-Meier survival curve representing the "survival" of individuals at a given time point. E.g. If the K-M curve = 0.7 at a time of 6 years then 70% of individuals have yet to have the event of study at that time (have survived).
Drag the grey bar across the x-axis to regenerate the K-M curve for the individuals who entered the study past the filter point.
The fact that the survival curve drops to 0 almost immediately when considering all the data illustrates a pitfall of non-parametric methods for generating a survival curve when you have left truncated data. By filtering the data that the curve is generated with, we are generating a conditional survival curve, or he survival curve for an individual given that they have survived to time t.
Data Source
Klein and Moeschberger (1997) Survival Analysis Techniques for Censored and truncated data, Springer. Hyde Biometrika (1977), 225-230.
https://d3js.org/d3.v4.min.js
https://d3js.org/d3-selection-multi.v1.min.js