Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's wrong, if
min !== MAX_INTEGER
, we still wantMath.min(min, timestamps[0]);
becausemin
can change line 545 to a lower value. I don't understand why these 2 lines need to be modified, @Andgoncharov can you elaborate why these changes?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree about elaborating this. @Andgoncharov could you post images with and without these changes? I also agree that we need to keep the
Math.min()
call.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @simonbrunel, @etimberg,
I've created a fiddle https://jsfiddle.net/andgoncharov/8bgen7b7/ to display the problem. When I change options.time.min and options.time.max values, I expect that chart is displayed within specified borders and ticks are also distributed between those values. Currently, min and max values ain't taken into account if they are inside (timestamps[0], timestamps[length - 1]) interval.
When I apply my changes, the updated chart contains a number of x-axis labels according to the settings I've specified upon creation of the chart. Or may be I misunderstood something?