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

3d column chart with scrollbar shows spurious point label #7103

Closed
marklofdahl opened this Issue Aug 25, 2017 · 1 comment

Comments

Projects
None yet
3 participants
@marklofdahl

marklofdahl commented Aug 25, 2017

Expected behaviour

Chart should only show data point labels for visible data points.

Actual behaviour

Chart has data points that are not visible, due to the xAxis max, and scrollbar.
For a data point off the chart to the right, the label is showing up on the far left of the chart.
135.6% is showing up on the far left, and should not show up at all when the scrollbar is to the far left.

Live demo with steps to reproduce

http://jsfiddle.net/marklofdahl/gj5Lqkar/

Affected browser(s)

tested in Firefox

@pawelfus

This comment has been minimized.

Contributor

pawelfus commented Aug 28, 2017

Hi @marklofdahl

Thank you for reporting this issue.

Workaround:
Manually filter out unnecessary datalabels using dataLabels.formatter, demo: http://jsfiddle.net/bgbpr5b6/


formatter: function () {
  var xAxis = this.series.xAxis;

  if (this.x >= xAxis.min && this.x <= xAxis.max) {
    return Highcharts.numberFormat(this.y, 2) +'%';
  } else {
    return '';
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment