Selection range is incorrect at start if the upper bound is the max index
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.4k
- Avg merge
- 6d 16h
- Merged PRs (30d)
- 1
Description
* **C3 version**: 0.6.7
* **D3 version**: 5.5.0
* **Browser**: Firefox Nightly 63 (2018-08-18)
* **OS**: Linux 64bits (latest Ubuntu LTS)
See the following JSFiddle: https://jsfiddle.net/xnpksgjb/12/
My intent is to pre-select the last 3 categories, by using their indexes in the series list, so I use the configuration option `axis.x.selection` for this; note the same issue happens with `zoom.initialRange` set to the same values.
The pre-selected range that is shown is correct, but when one tries to move it around by dragging it to the left, in the subchart, it gets bigger than what's shown to screen. So it seems the X domain upper bound is bigger than the maximum width, and is just trimmed at start.
If you change the `highExtent` value to something less than the maximum possible index, then it works fine, so this suggests it's an issue only with the last value.
This is unfortunate, because `zoom.initialRange` and `axis.x.selection` looked like good candidates to replace the `extent` option that disappeared in latest versions.
Please let me know if I can help in any way!
Contributor guide
Assessment
This issue has not been assessed yet.