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

Cannot update xAxis range dynamically #6773

Closed
ShMcK opened this Issue May 27, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@ShMcK

ShMcK commented May 27, 2017

Calling update should change the xAxis range, but doesn't.

Highcharts.stockChart('container', {
    xAxis: {
        range: 6 * 30 * 24 * 3600 * 1000 // six months
    },
    rangeSelector: {
        enabled: false
    },
    series: [{
        name: 'USD to EUR',
        data: usdeur
    }]
});


setTimeout(() => {
 $('#container').highcharts().xAxis[0].update({
   range: 12 * 30 * 24 * 3600 * 1000 // 1 year
 });
 alert('should be one year. Is still six months')
}, 3000);

See Live Example

@pawelfus

This comment has been minimized.

Show comment
Hide comment
@pawelfus

pawelfus May 29, 2017

Contributor

Hi @ShMcK

Thank you for reporting the issue. It looks like the extremes from navigator have higher priority than range option.

Workaround:
Use Axis.setExtremes() instead of Axis.update({range: newRange}). Demo: http://jsfiddle.net/mfroh6b4/

Contributor

pawelfus commented May 29, 2017

Hi @ShMcK

Thank you for reporting the issue. It looks like the extremes from navigator have higher priority than range option.

Workaround:
Use Axis.setExtremes() instead of Axis.update({range: newRange}). Demo: http://jsfiddle.net/mfroh6b4/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment