Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Graph2d: select Event #311

Open
Gillingham opened this issue Sep 13, 2014 · 7 comments
Open

Graph2d: select Event #311

Gillingham opened this issue Sep 13, 2014 · 7 comments
Assignees

Comments

@Gillingham
Copy link
Contributor

A select event on the graph2d version of timeline would be very useful, the docs page, http://visjs.org/docs/graph2d.html#Events, actually has a sample 'select' event but I think it was just left over from a copy/paste of the timeline docs.

@AlexDM0
Copy link
Contributor

AlexDM0 commented Sep 15, 2014

Hi,

This was indeed a poorly copied over example. There is no select in graph2d as it is now. Problem with graph2d selection, is that there is nothing to select at the moment. What would you think is a good thing to select? Curves? Datapoints?

I'm not sure yet what a useful select would be.

Regards,

Alex

@Gillingham
Copy link
Contributor Author

Data points definitely, being able to get the currently selected Item would be very useful for doing something like displaying a popover/tooltip/whatever containing the current x/y values plus any custom metadata.

Being able to select the curve would be useful as well, something like highlighting the currently selected curve and displaying the x/y values at the point the cursor is at is a thing I've seen on other graphs, but I think that's probably less important than being able to select the data points themselves.

@AlexDM0
Copy link
Contributor

AlexDM0 commented Sep 15, 2014

Hi,

Problem is that the datapoints are not necessarily objects that are drawn. Yes you can choose to show them on the graph, but for a tooltip we'd need a more in depth solution. I still have tooltips on my todo list and once those are in place, it would be easy to get events like hover etc. I'll implement these features when I'll need them but I'm not sure when this will be.

Curve highlighting events would be cool as well, accompanied by legend highlighting and an event if the user has custom legends.

I'm not sure when these will be implemented though. Feel free to do a pull request if you find the time :).

Regards,

Alex

@Gillingham
Copy link
Contributor Author

If the data points are shown, then a select event for just that would be fine, not having it when they aren't rendered would be acceptable since you can't have an event for invisible things.

I think having that would be more useful than a vis provided tooltip. I usually embed additional information into the Item DataSets which is something I can then use inside a custom event instead of relying on built in tooltips or providing each node with a fixed prepopulated HTML tooltip.

@AlexDM0
Copy link
Contributor

AlexDM0 commented Sep 15, 2014

What I had in mind for the tooltip was in fact to "click" on invisible
datapoints. Once that's done, tooltip and/or events are easy and
regardless of drawing style.

Since this is drawn with svg, there are no direct bindings to dom
elements (you could of course but you'd be limited to drawing style).

Hence I think the select event is a consequence of the tooltips, not a
primary goal. Does that make sense?

Regards

Alex

@AlexDM0
Copy link
Contributor

AlexDM0 commented Jan 9, 2015

Hi,

Over the last year a lot of feature requests have been made. We have just introduced our new website which has a list of the requested features. We have placed this request on that list.

The list can be found here:
http://visjs.org/featureRequests.html

An explaination of the new system can be found here:
http://visjs.org/blog.html#New\ website\ for\ vis.js!

I would like to stress that this does not mean we abandon this request. Discussion here will continue if needed on this feature but we will close it to keep our Github issue page more of a bug-todo list.

Future feature requests will still be made here and then added to the website by us.

Regards,

Alex

@mojoaxel
Copy link
Member

Reopening as Feature-Request issue (see #2114).
Everybody: Please feel free to implement this!

@mojoaxel mojoaxel reopened this Oct 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants