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

bellcurve module fails #8506

Closed
ddoice opened this issue Jun 21, 2018 · 1 comment
Closed

bellcurve module fails #8506

ddoice opened this issue Jun 21, 2018 · 1 comment
Assignees
Labels

Comments

@ddoice
Copy link

@ddoice ddoice commented Jun 21, 2018

Expected behaviour

Highcharts + BellCurve module to create a histogram.

Actual behaviour

Scatter plots nicely but histogram module fails on binning and frecuency count doesnt match, missing columns.

I have patched our own version, file histogram-bellcurve.src.js adding in line 307:

if (frequencies[x] === undefined) { frequencies[x] = 0; }

Live demo with steps to reproduce

https://jsfiddle.net/tq0wpL4y/
24 samples, adding all columns = 10, 14 missing.

Product version

highcharts 6.1

Affected browser(s)

all

@KacperMadej
Copy link
Contributor

@KacperMadej KacperMadej commented Jul 19, 2018

The path presented as a wrapper - temporary workaround: https://jsfiddle.net/BlackLabel/x5ren8Lo/

Internal note:
The problem here is caused by floating point math imprecision not handled good enough in histogram-bellcurve module - some edge cases causes wrong bin detection while setting bins and different bin sort for values.

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

Successfully merging a pull request may close this issue.

None yet
4 participants