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

Point.update with no change to y value, in load event, when exporting is hiding the point. #4916

Closed
KacperMadej opened this Issue Jan 12, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@KacperMadej
Contributor

KacperMadej commented Jan 12, 2016

If in a load event of a chart is a point.update that do not have y, then when exporting the point gets a new value - probably a null.
Example: http://jsfiddle.net/9mtLykpn/1/
Steps: 1. export the chart - exported image lacks column with the red dataLabel

Was working in 4.1.9 - http://jsfiddle.net/9mtLykpn/

@pawelfus

This comment has been minimized.

Show comment
Hide comment
@pawelfus

pawelfus Jan 12, 2016

Contributor

Workaround:

Set y value explicit: http://jsfiddle.net/9mtLykpn/2/

chart: {
  type: 'bar',
  events: {
    load: function() {
      this.series[0].points[3].update({
        y: this.series[0].points[3].y,
        dataLabels: {
          color: 'red'
        }
      }, true, false);
    }
  }
},
Contributor

pawelfus commented Jan 12, 2016

Workaround:

Set y value explicit: http://jsfiddle.net/9mtLykpn/2/

chart: {
  type: 'bar',
  events: {
    load: function() {
      this.series[0].points[3].update({
        y: this.series[0].points[3].y,
        dataLabels: {
          color: 'red'
        }
      }, true, false);
    }
  }
},
@sergevic

This comment has been minimized.

Show comment
Hide comment
@sergevic

sergevic Feb 24, 2017

Reported issue also valid for line chart with xAxis type 'datetime'.
Above workaround have to be done for x value as well, otherwise changed points start drawing in 1970 year (before/after screenshot http://take.ms/NMx9S)
Reproduced issue: http://jsfiddle.net/rorhpneb/1/ (highchart v 5.0.7)

sergevic commented Feb 24, 2017

Reported issue also valid for line chart with xAxis type 'datetime'.
Above workaround have to be done for x value as well, otherwise changed points start drawing in 1970 year (before/after screenshot http://take.ms/NMx9S)
Reproduced issue: http://jsfiddle.net/rorhpneb/1/ (highchart v 5.0.7)

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