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

Removing title doesn't reflow legend #8014

Closed
pawelfus opened this issue Mar 14, 2018 · 1 comment
Closed

Removing title doesn't reflow legend #8014

pawelfus opened this issue Mar 14, 2018 · 1 comment
Labels

Comments

@pawelfus
Copy link
Contributor

@pawelfus pawelfus commented Mar 14, 2018

Expected behaviour

Legend above the plotting area

Actual behaviour

Legend overlaps plotting area

Live demo with steps to reproduce

http://jsfiddle.net/BlackLabel/m1ydcLx7/7/

Before:
screen shot 2018-03-14 at 15 35 12

Click on "remove title":
screen shot 2018-03-14 at 15 35 19

Details

In 6.0.4 we implemented anty-collision for legend, from changelog:

Highcharts now makes room for the legend in the layout if it has verticalAlign: 'top' with a horizontal legend. In existing charts using this layout, the layout of the legend and the plot area may be affected.

So it looks like init is correct, but title's change should also change chart's box.

@pawelfus
Copy link
Contributor Author

@pawelfus pawelfus commented Mar 14, 2018

Workaround:
Snippet:

  chart.setTitle({
    text: null
  }, {
    text: null
  }, false);
  chart.isDirtyLegend = true; // workaround
  chart.redraw();

Demo: http://jsfiddle.net/BlackLabel/m1ydcLx7/16/

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
1 participant