n3-charts / line-chart

Awesome charts for AngularJS.
http://n3-charts.github.io/line-chart/
MIT License
1.2k stars 180 forks source link

Toggling data series off/on causes chart height to expand #522

Open danielbonnell opened 7 years ago

danielbonnell commented 7 years ago

Hello, I've noticed a bug with the chart legend toggling functionality. Specifically, if you toggle a data series off and then on again, the height of the chart increases by a few pixels when it's redrawn. This process repeats each time you toggle a series. You can see it in action on the examples page on the last few charts, though it seems to stop after a few times there. In my app, it keeps expanding for an infinite number of clicks. I haven't seen any errors associated with this. I'm using Angular 1.5.5 and the latest release of line-chart. I'm using D3 3.5.7.

DogeThis commented 7 years ago

Hi @danielbonnell, I fixed this by setting a fixed height for the container, like in the examples you linked to.

.container { width: 600px; height: 300px; }

Is your issue related to : https://github.com/n3-charts/line-chart/issues/439?