-
Notifications
You must be signed in to change notification settings - Fork 236
Open
Description
What you were expecting:
When a drop's color is overridden such that drops in the same row have multiple colors, the drop colors should persist regardless of zooming or dragging.
What happened instead:
Zooming or dragging some drops out of view seems to shift the colors to the wrong drops.
Steps to reproduce:
Give drops in a row multiple colors
Zoom or scroll the right most drop out of view
Note that the colors shift left
Related code:
<script type="text/javascript">
var global;
$(document).ready(function () {
console.log("ready!");
const chart = eventDrops({
drop: {
date: d => new Date(d.date),
color: d => d.color
}
});
const repositoriesData = [
{
name: 'System1',
data: [{ date: new Date('2020/03/15 14:21:31'), color: 'red' }
, { date: new Date('2020/02/15 14:21:31'), color: 'grey' }
, { date: new Date('2020/01/15 14:21:31'), color: 'grey' }
, { date: new Date('2019/05/15 14:21:31'), color: 'grey' }
, { date: new Date('2018/03/15 14:21:31'), color: 'grey' }
],
}
];
if (global === undefined) { global = window; } //Unpkg workaround
d3
.select('#eventdrops-demo')
.data([repositoriesData])
.call(chart);
});
</script>
Other information:
With the default scale:

After dragging the right most drop out of range:

Environment
- D3 version 5.15.0
- EventDrops version 1.3.0
- Browser: Any (verified in Chrome, Edge)
Metadata
Metadata
Assignees
Labels
No labels