Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop colors shift after zoom or scroll #282

Open
DonClaveau3 opened this issue Apr 1, 2020 · 2 comments
Open

Drop colors shift after zoom or scroll #282

DonClaveau3 opened this issue Apr 1, 2020 · 2 comments

Comments

@DonClaveau3
Copy link

DonClaveau3 commented Apr 1, 2020

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:
image

After dragging the right most drop out of range:
image

Environment

  • D3 version 5.15.0
  • EventDrops version 1.3.0
  • Browser: Any (verified in Chrome, Edge)
@DonClaveau3
Copy link
Author

Realized after submitting that this duplicates #267. I can try using master as suggested there. Are there plans to release a new version soon?

@Busteren
Copy link
Contributor

@DonClaveau3 I have asked the maintainers to release a new version, but so far I don't think there is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants