Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeline start and end options are not taken into account #346

Open
ova2 opened this issue Apr 25, 2015 · 5 comments
Open

Timeline start and end options are not taken into account #346

ova2 opened this issue Apr 25, 2015 · 5 comments

Comments

@ova2
Copy link
Contributor

ova2 commented Apr 25, 2015

The docu says:

start: "The initial start date for the axis of the timeline. If not provided, the earliest date present in the events is taken as start date."
end: "The initial end date for the axis of the timeline. If not provided, the latest date present in the events is taken as end date."

But you have removed in the last version the logic for this.options.start and this.options.end from the function links.Timeline.prototype.draw. We had

if (this.options && (this.options.start || this.options.end)) {
    this.setVisibleChartRange(this.options.start, this.options.end);
}

but now we have

if (this.firstDraw) {
    this.setVisibleChartRangeAuto();
}

The problem is that this.setVisibleChartRangeAuto() doesn't take start and end options into account. They are simple ignored.

@josdejong
Copy link
Contributor

Hm passing start and end via .draw is being deprecated (you should see a deprecation warning in your console). See commit 15fcd83). I didn't realize this would be a breaking change, should have been published as a breaking release.

@josdejong josdejong removed the bug label Apr 28, 2015
@ova2
Copy link
Contributor Author

ova2 commented Apr 28, 2015

Yes, I know this deprecation warning and I know your commit. We don't pass options via .draw due to this warning. But now, we have a problem because start and end dates are not considered. I think this is easy to fix. Thanks in advance.

@josdejong
Copy link
Contributor

I don't expect to have time to fix this very soon, but if you could put together a PR would be great.

@ova2
Copy link
Contributor Author

ova2 commented Apr 28, 2015

Sure, I can put PR, but a little bit later (the same - no time to fix this very soon).

@ova2
Copy link
Contributor Author

ova2 commented Jun 10, 2015

Done. The pull request is here https://github.com/almende/chap-links-library/pull/351/files Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants