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

Bubble chart wrong X axis maximum calculated when min is set #8901

Closed
ivanmjartan opened this issue Sep 6, 2018 · 1 comment
Closed

Bubble chart wrong X axis maximum calculated when min is set #8901

ivanmjartan opened this issue Sep 6, 2018 · 1 comment
Assignees
Labels

Comments

@ivanmjartan
Copy link

@ivanmjartan ivanmjartan commented Sep 6, 2018

Hi there we have problem in our Bubble chart.

We have several series in bubble chart.

3 of them have X value [40542, 40907,41270] (3 bubbles) others are empty.

When we set min value of x axis to 40805 result graph is empty

Expected behaviour

there will be one bubble with value 41270

Actual behaviour

Graph is empty

Live demo with steps to reproduce

https://jsfiddle.net/9j07b3ym/

Try to remove "min": 40805 in x axis definition

Product version

We are using 4.2.5

Test repro version current

Affected browser(s)

@pawelfus
Copy link
Contributor

@pawelfus pawelfus commented Sep 7, 2018

Hi @ivanmjartan

Thank you for reporting this bug. It looks like setting max resolves the issue too: https://jsfiddle.net/BlackLabel/9n0sjrae/

Simplified demo: https://jsfiddle.net/BlackLabel/9n0sjrae/4/

Internal note:
For some reason, xAxis.max is miscalculated:

< Highcharts.charts[0].xAxis[0].getExtremes();
> {
>   dataMax: 41013,
>   dataMin: 40542,
>   max: 40975.42787658802,
>   min: 40805,
>  userMax: undefined,
>   userMin: undefined
> }

Simple modification here:

transA *= (axisLength + pxMin - pxMax) / axisLength;

From pxMin - pxMax to Math.abs(pxMin - pxMax) looks better, but bubble is still cut off.

@pawelfus pawelfus added the Type: Bug label Sep 7, 2018
@TorsteinHonsi TorsteinHonsi self-assigned this Sep 10, 2018
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
3 participants