marmelab/EventDrops

Way to get number of events inside metaball

badyalgaurav opened this issue · 1 comments

Please do not submit support requests or "How to" questions here. For that, go to StackOverflow.

What you were expecting:
Expecting to show number of events inside metaball as count over metaball.

Currently, there is no way to know the number of events inside metaball.
What happened instead:
It would be nice feature if there is count shown over the metaball.

If number of events inside metaball shown over the metaball, it is easier for user to know how many events are inside it.

Steps to reproduce:

Related code:

insert short code snippets here

Other information:

Environment

  • EventDrops version 1.3
  • Browser:chrome
  • Stack trace (in case of a JS error):

In order to do this, I think you would have to calculate the time distance between two data points (essentially the two circles) and if it is within X (x is a predefined distance), then you can add a text somewhere int he centre of these two nodes.

But the tricky part comes when you have different zoom levels, as this will need to taken into account. Also with the zooming, you need to have an enter, update, exit pattern on the labels as well (as the metaballs will appear and disappear) and they need to be dynamically positioned.

Not sure how accurate it will be (displaying the right number, or the number you expect). It might also make it a bit more cluttered, depending on your data.
Not sure I have the time to devote to it.