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

No-data-to-display label shows when word cloud chart has data plotted and visible. #7264

Closed
peter-stoyanov opened this Issue Oct 12, 2017 · 1 comment

Comments

Projects
None yet
3 participants
@peter-stoyanov

peter-stoyanov commented Oct 12, 2017

Expected behaviour

When data is present and visible in the plot area of a Wordcloud type chart there should be no "No data to display" label rendered.

Actual behaviour

"No data to display" label is overlapping with the actual data.

Live demo with steps to reproduce

The issue is visible in the following js fiddle:

http://jsfiddle.net/peshoStoyanov/xq1sz6q7/4/

Affected browser(s)

Tested only on Google Chrome
Version 61.0.3163.100 (Official Build) (64-bit)

Debugging

I am new to highcharts but when I debugged the source code I think the issue is in these lines:

/**
* Define hasData functions for series. These return true if there are data
* points on this series within the plot area.
*/
H.Series.prototype.hasData = function() {
    return this.visible && this.dataMax !== undefined && this.dataMin !== undefined; // #3703
};

For my wordcloud chart hasData() returns false, due to this.dataMax and this.dataMin being undefined.

@pawelfus

This comment has been minimized.

Show comment
Hide comment
@pawelfus

pawelfus Oct 12, 2017

Contributor

Hi @peter-stoyanov

Thanks for reporting this bug!

Workaround:
Overwrite hasData method:

Highcharts.seriesTypes.wordcloud.prototype.hasData = function () {
	return this.visible && this.points.length > 0;
};

Demo: http://jsfiddle.net/xq1sz6q7/6/

@jon-a-nygaard

Contributor

pawelfus commented Oct 12, 2017

Hi @peter-stoyanov

Thanks for reporting this bug!

Workaround:
Overwrite hasData method:

Highcharts.seriesTypes.wordcloud.prototype.hasData = function () {
	return this.visible && this.points.length > 0;
};

Demo: http://jsfiddle.net/xq1sz6q7/6/

@jon-a-nygaard

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