                     .attr('id', "dataset-#{id}")
 
         @datasets[id] = new Dataset({
+            id: id,
             index: index,
             color: definition.color,
             source: definition.source,

            @element.dispatchEvent(
                new CustomEvent('recordClicked', {
                    detail: {
                        start: record[0],
                        end: record[1],
                        params: record[2]

            )
        )

    drawRanges: (datasetElement, dataset, records) ->
        datasetElement.selectAll('rect').remove()

        r = datasetElement.selectAll('rect')
