This plugin adjust the height according to the legend height.
The contents of the plugin is located in the javascript file "adapt-chart-to-legend.js". This plugin is published under the MIT license, and the license document is included in the repository.