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

Highstock : A column serie added to a stockchart after the chart initialization disappears when user move the right handle of the chart navigator #5699

Closed
Nalia opened this issue Sep 16, 2016 · 7 comments

Comments

@Nalia
Copy link

Nalia commented Sep 16, 2016

Expected behaviour

User should change extremes with navigator handles even if a column serie is added to a stockchart after the chart initialization.

Actual behaviour

If a user add a column type serie to a stockchart after the chart initialization, then if user moves the right handle of the chart navigator, the column serie disappears.

It worked in Highstock version 4.2.4.

Live demo with steps to reproduce

http://jsfiddle.net/fq180r43/1/
Just play with the right handle in chart navigator to see that the column serie disappears.

Affected browser(s)

Chrome, Firefox, IE11, Edge

@pawelfus
Copy link
Contributor

Hi @Nalia

Thank you for reporting the issue!

Internal note:
Fails after 472787c

@pawelfus
Copy link
Contributor

Workaround:

Set series as dirty here:

(function(H) {
  H.wrap(H.Axis.prototype, 'setScale', function(proceed) {
    proceed.call(this);
    H.each(this.series, function(series) {
      series.hasProcessed = false;
      series.isDirty = true;
    });
  });
})(Highcharts);

Demo: http://jsfiddle.net/2vk70904/

Internal note:
The same way we can fix this, but the problem is deeper: here and here - do we need to use timeouts? Calling it directly in the stack works fine, without this issue.

@Nalia
Copy link
Author

Nalia commented Sep 16, 2016

Hi @pawelfus,

Thank you for the workaround, it works well!

@TorsteinHonsi
Copy link
Collaborator

I'm not sure what the timeouts are there for, they seem to have been added when liveRedraw was first implemented. If it works fine without them, we should remove them.

@pawelfus pawelfus self-assigned this Sep 19, 2016
pawelfus added a commit that referenced this issue Sep 19, 2016
@pawelfus
Copy link
Contributor

Internal note:
After more digging, setTimeouts weren't culprits. On mouse up event, dataGrouping could change which caused destroying points, but not really recreating them (comment was old/misleading).

@TorsteinHonsi
Copy link
Collaborator

Great! Should you update the comment too?

@pawelfus
Copy link
Contributor

Now that line does as comment says, so no changing comment :)

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

No branches or pull requests

3 participants