Open mustafa2808 opened 10 years ago
That looks nice :)
You can specify a maximum and minimum zoom level with the options zoomMin
and zoomMax
(see documentation).
There is no generic click handler in the Timeline. Maybe you could add click handlers to your background objects (they can contain HTML), and use that to trigger a function to adjust the visible range. You can adjust the visible range with the function setVisibleChartRange(start, end)
.
I have set the zoomMax setting here but all stops when i change anything here. Could you suggest what changes i have to make to set zoom (scaling) amount.
////////// 'zoomMax': 1000 * 60 * 60 * 24 * 365 * 10000, // milliseconds ///////// var options = this.options; var year = 1000 * 60 * 60 * 24 * 365; var zoomMin = Number(options.zoomMin) || 10; if (zoomMin < 10) { zoomMin = 10; } var zoomMax = Number(options.zoomMax) || 10000 * year; if (zoomMax > 10000 * year) { zoomMax = 10000 * year; } if (zoomMax < zoomMin) { zoomMax = zoomMin; }
Thanks for your appreciation and support
I have set the zoomMax setting here but all stops when i change anything here.
I'm not sure what you mean. Don't you need to set zoomMin
instead of zoomMax
?
I mean when i zoom the timeline it should only zoom upto the year not more then that.
when i edit the code of zoomMin or zoomMax it does'nt work. So could help me out here as i am not a developer but a ui-ux designer m not into hard coding :).
I don't understand why you want to adjust the code of the Timeline for this, unless you're convinced there is a bug there.
I mean when i zoom the timeline it should only zoom upto the year not more then that.
Don't you need to use zoomMin
instead of zoomMax
? zoomMin
limits how much you can zoom in.
Maybe the following example helps: http://almende.github.io/chap-links-library/js/timeline/examples/example18_limit_range.html
Hello, If I want to bind click event into timeline.js and if I click with mouse its give me same effect as on mouse scroll. Can you please provide us some solutions ? Thanks.
Is your zoomMin
issue solved?
See my earlier comment for the click issue. You will have to be creative yourself adding some jquery event listeners or something like that.
I have used your Timeline plugin and created a history timeline. Which contains data from stone age, bronze age to current age. My questions are:
Zoom level: