marmelab / marmelab/EventDrops
Drop colors shift after zoom or scroll
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.3k
- Forks
- 233
- PR merge metrics
- No merged PRs in 30d
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:**
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);
});
**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)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the inline eventDrops configuration and the supplied multi-colored drop data, then inspect the zoom and drag rendering paths in the repository. Verify that colors remain associated with their original drops after zooming or moving a drop out of view.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- d3js, javascript
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100