vasturiano / timelines-chart

Timelines Chart
http://vasturiano.github.io/timelines-chart/example/categorical/
MIT License
556 stars 121 forks source link

Add data attribute to store arbitrary data in #76

Closed pizzapanther closed 4 years ago

pizzapanther commented 4 years ago

I added copying all properties so you can store arbitrary data in the data point. This is useful so you can more easily add custom interactions. For example, I added an "ID" to the stored data so that when a segment is clicked, I can easily jump to a time and location on a connected map.

pizzapanther commented 4 years ago

@vasturiano ready for review again

pizzapanther commented 4 years ago

ok i added the data attribute for the original object and I left const { timeRange, val, labelVal } = rawData[i].data[j].data[k]; I thought that was a nice way to cut down on line length and make it more readable.

pizzapanther commented 4 years ago

ready for review @vasturiano

vasturiano commented 4 years ago

Looks great, thanks @pizzapanther!