Open ova2 opened 9 years ago
Thanks for your PR Oleg.
I think though that the function setVisibleChartRangeAuto
is not the right place for this logic: the function will then no longer (always) do what it's supposed to do: fit all items.
It was working for me. What is the right place then? Somewhere here?
if (this.firstDraw) {
// logic for start / end options
...
this.setVisibleChartRangeAuto();
}
Currenty, the function setVisibleChartRangeAuto()
is only called in this if (this.firstDraw)
. I tested all use cases and it was fine, so I can not see any problems.
It will indeed work fine, but setVisibleChartRangeAuto
is a public method which then will no longer behave as advertised.
I guess a more robust solution would be to create a new (private?) helper function for this, something like _setVisibleChartRangeInitial
.
Fix for https://github.com/almende/chap-links-library/issues/346 Please approve this pull request.