seveves / angular-vis

An angular 2 vis.js project
MIT License
50 stars 41 forks source link

'title' not showing #15

Closed joel00 closed 7 years ago

joel00 commented 7 years ago

Is there any issue with titles? they do not show on hover.

using "ng2-vis": "0.0.2"

seveves commented 7 years ago

I will check this and add it to the demo asap

seveves commented 7 years ago

The problem is that VisNode and the interface INode do not have the title property. You can add your own interface like interface VisExNode extends VisNode { title?: string } ... when using VisExNode in the DataSet then this should work but I will update the visjs typings and create a new version asap.

seveves commented 7 years ago

I've published version 0.0.3. Please let me know if this version fixes your problem. On my demo page you can check the network example. There I've added a title on Node 5 and it's working

joel00 commented 7 years ago

@seveves thanks for the update.... I tried 0.0.3 and I can see the INode with the new property but can't see titles yet... I'm reviewing my code and let you know.

armay commented 7 years ago

By the way, 'group' property is also missing on the INode interface. The suggestion about just extending VisNode does not help in my case because VisNode figures explicitly in VisNodes class which I need to import. It would be nice if someone either adds all the properties needed or rewrites VisNodes as VisNodes\<T extends VisNode>. At the moment one can use \<VisNode>{...} to cope with this.

seveves commented 7 years ago

Alright ... I'll keep this in mind till I make the next change to the typings-vis project. Maybe at the weekend

seveves commented 7 years ago

Next release will contain group and cid properties both having IdType (string|number)

seveves commented 7 years ago

@armay latest version 0.0.5 should have group property. Please let me know if this works for you.