This post describes how to build a density chart with a dropdown button that filters the input dataset. It allows to explore the data without showing too many data on the chart, avoiding overlapping.
updateChart
function that update this chart with a new dataset