Comments (7)
The Timeline of the successor of chap-links-library, vis.js, has eventlisteners like click
and doubleClick
which you can use.
About refreshing data: without a code example of what you're doing there isn't much I can say about that. When loading new data you have to apply it using Timeline.setData()
, do you do that?
from chap-links-library.
I have working action and modal form but I need to pass the datas from the clicked cluster - I mean if I have few groups and I click on 9 July in group "abcd" i need to pass the start date and name of group into this modal form.
Ohh, thanks. I didn't check with setData() - maybe it will help, let you know.
from chap-links-library.
I mean if I have few groups and I click on 9 July in group "abcd" i need to pass the start date and name of group into this modal form.
There is no built-in way to get this information, you will have to hack something for this into the Timeline yourself. The event listeners of vis.js do
provide this information, however, the Timeline of vis.js doesn't yet have support for clustering.
from chap-links-library.
I did it this way:
First we need this function:
function getSelectedRow() {
var row = undefined;
var sel = timeline.getSelection();
if (sel.length) {
if (sel[0].row != undefined) {
row = sel[0].row;
}
}
return row;
}
Now everything what we have to do is add a variable into our listener function (it's running on double click):
var onadd = function () {
var test = timeline.getItem(getSelectedRow());
$('#form').modal('show');
};
links.events.addListener(timeline, 'add', onadd);
from chap-links-library.
What do you mean? Do you mean you solved it like this?
from chap-links-library.
Yep, It is working fine.
Variable test return an object like this:
content: "New"
group: "abcd"
start: Date {Thu Jul 16 2015 22:21:52 GMT+0200}
type: "box"
from chap-links-library.
Ah now I get what you mean. Ok great you solved it, I will close the issue then.
from chap-links-library.
Related Issues (20)
- chap links timeline customisation HOT 3
- Timeline - Wrong item top position with empty group HOT 3
- Network - How can I fire an event on node/link selection HOT 1
- Timeline - Set custom time with click HOT 2
- Can't scroll vertically when on mobile HOT 1
- (timeline) fix top and group axis left to scroll down with touch - Question HOT 12
- zoomin and zoomout feature not working in chaps link library timeline slider HOT 1
- On executing draw/redraw the slider not rendering after first time calling the draw method of chaps link library timeline. HOT 1
- 1 month offset in timeline HOT 2
- Destroy method for timeline
- Drag and Drop from external events
- Time limit
- Input textbox not working.
- Timeline "isSelected" and "unselectItem" don't work with clusters
- Can't load graphs while running GWT projects, but it runs with JS version
- graph3d.js enhancements HOT 1
- Stacking not always working
- B.C. Dates possible?
- Keep -dump output pristine
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chap-links-library.