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

Highstocks rangeSelector, `selected` not working on button with `offsetMin` (v6.0.3) #7467

Harvzor opened this issue Nov 29, 2017 · 4 comments


Copy link

@Harvzor Harvzor commented Nov 29, 2017

Expected behaviour

Using the selected config option in the rangeSelector should select a button by default.

Actual behaviour

No button iselected/s highlighted. Instead, It's like the default option for 1y is being selected where as I need it to use my offsetMin.

Live demo with steps to reproduce

I have created a custom button with this config:

    type: 'year',
    count: 1,
    text: '1y',
    // Commenting out this line causes 1y to get selected.
    offsetMin: -1 * 24 * 3600 * 1000

The offsetMin is there so 1 year and 1 day will be shown, so rather than:

2016-11-28 - 2017-11-28

This date range will be used:

2016-11-27 - 2017-11-28

However, the selected field doesn't work with this button.

Commenting out line 28 in the demo (the offsetMin field) causes the selected option to work again.

Thanks for the hard work!

@Harvzor Harvzor changed the title Highstocks rangeSelector, `selected` not working on button with `offsetMin` Highstocks rangeSelector, `selected` not working on button with `offsetMin` (v6.0.3) Nov 29, 2017
Copy link

@KacperMadej KacperMadej commented Nov 29, 2017


Thank you for reporting about the problem.

Copy link

@KacperMadej KacperMadej commented Nov 30, 2017

Interna note: time set by selected button in chart config doesn't include offsetMin

Copy link

@gemadang gemadang commented Jun 14, 2019

Sorry why was this closed, was there a solution to this bug that was issued 2 years ago?

Copy link

@pawelfus pawelfus commented Jun 17, 2019

Hi @gemadang

Yes, this is fixed. Above your message, a commit is referenced that closed this issue:

Screen Shot 2019-06-17 at 09 52 53

Commit: 279530c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants